… | |
… | |
33 | our $config; |
33 | our $config; |
34 | our $LIBDIR = "."; |
34 | our $LIBDIR = "."; |
35 | |
35 | |
36 | use KGS::Constants; |
36 | use KGS::Constants; |
37 | |
37 | |
38 | for (qw(util.pl gtk.pl chat.pl image.pl sound.pl user.pl gamelist.pl userlist.pl challenge.pl |
38 | for (qw(util.pl gtk.pl chat.pl superchat.pl sound.pl user.pl gamelist.pl userlist.pl |
39 | game.pl room.pl roomlist.pl app.pl)) { |
39 | game.pl room.pl roomlist.pl app.pl)) { |
40 | require (KGS::Constants::findfile "KGS/kgsueme/$_"); |
40 | require (KGS::Constants::findfile "KGS/kgsueme/$_"); |
41 | die if $@; |
41 | die if $@; |
42 | } |
42 | } |
43 | } |
43 | } |
44 | |
44 | |
45 | our $app = new app; |
|
|
46 | |
|
|
47 | if ($ENV{KGSUEME_DEBUG}) { |
45 | if ($ENV{KGSUEME_DEBUG}) { |
48 | use KGS::Constants; |
46 | use KGS::Constants; |
49 | |
47 | |
50 | for (19) { |
48 | for (19) { |
51 | my $game = new game size => $_; |
49 | my $game = new game size => $_; |
|
|
50 | |
|
|
51 | $game->event_challenge ( |
|
|
52 | bless( { |
|
|
53 | type => 0, |
|
|
54 | black => bless( { |
|
|
55 | flags => 2633, |
|
|
56 | name => 'dorkusx' |
|
|
57 | }, 'KGS::User' ), |
|
|
58 | rules => bless( { |
|
|
59 | count => 5, |
|
|
60 | time => 900, |
|
|
61 | timesys => 2, |
|
|
62 | interval => 30, |
|
|
63 | komi => '6.5', |
|
|
64 | size => 19, |
|
|
65 | ruleset => 0, |
|
|
66 | handicap => 2, |
|
|
67 | }, 'KGS::Rules' ), |
|
|
68 | white => bless( { |
|
|
69 | flags => 436220808, |
|
|
70 | name => 'Nerdamus' |
|
|
71 | }, 'KGS::User' ) |
|
|
72 | }, 'KGS::Challenge' )); |
|
|
73 | |
52 | |
74 | |
53 | if (1) { |
75 | if (0) { |
54 | my $data = Storable::retrieve "board1.dat"; |
76 | my $data = Storable::retrieve "board2.dat"; |
55 | while (my ($k, $v) = each %$data) { |
77 | while (my ($k, $v) = each %$data) { |
56 | $game->{$k} = $v; |
78 | $game->{$k} = $v; |
57 | } |
79 | } |
58 | $game->event_update_tree; |
80 | $game->event_update_tree; |
59 | } |
81 | } |
… | |
… | |
82 | $game->{cur_board}{label}[1][2] = "198"; |
104 | $game->{cur_board}{label}[1][2] = "198"; |
83 | $game->{cur_board}{board}[0][2] = MARK_W | MARK_LABEL; |
105 | $game->{cur_board}{board}[0][2] = MARK_W | MARK_LABEL; |
84 | $game->{cur_board}{label}[0][2] = "AWA"; |
106 | $game->{cur_board}{label}[0][2] = "AWA"; |
85 | $game->{board}->set_board ($game->{cur_board}); |
107 | $game->{board}->set_board ($game->{cur_board}); |
86 | } |
108 | } |
87 | $game->{window}->show_all; |
|
|
88 | } |
109 | } |
|
|
110 | main Gtk2; |
|
|
111 | |
89 | } |
112 | } |
|
|
113 | |
|
|
114 | our $app = new app; |
90 | |
115 | |
91 | main Gtk2; |
116 | main Gtk2; |
92 | |
117 | |
93 | $app->destroy; |
118 | $app->destroy; |
94 | |
119 | |