… | |
… | |
30 | BEGIN { |
30 | BEGIN { |
31 | our $VERSION = "0.1"; |
31 | our $VERSION = "0.1"; |
32 | |
32 | |
33 | our $config; |
33 | our $config; |
34 | our $LIBDIR = "."; |
34 | our $LIBDIR = "."; |
35 | our $APPDIR = "$LIBDIR/kgsueme"; |
|
|
36 | our $IMGDIR = "$LIBDIR/images"; |
|
|
37 | our $SNDDIR = "$LIBDIR/sounds"; |
|
|
38 | |
35 | |
|
|
36 | use KGS::Constants; |
|
|
37 | |
39 | 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 challenge.pl |
40 | board.pl game.pl room.pl roomlist.pl app.pl)) { |
39 | game.pl room.pl roomlist.pl app.pl)) { |
41 | require "$APPDIR/$_"; |
40 | require (KGS::Constants::findfile "KGS/kgsueme/$_"); |
|
|
41 | die if $@; |
42 | } |
42 | } |
43 | } |
43 | } |
44 | |
44 | |
45 | our $app = new app; |
45 | our $app = new app; |
46 | |
46 | |
47 | if (1) { |
47 | if ($ENV{KGSUEME_DEBUG}) { |
48 | use KGS::Constants; |
48 | use KGS::Constants; |
49 | |
49 | |
50 | for (19) { |
50 | for (19) { |
51 | my $game = new game size => $_; |
51 | my $game = new game size => $_; |
52 | |
52 | |
53 | if (1) { |
53 | if (1) { |
54 | my $data = Storable::retrieve "board1.dat"; |
54 | my $data = Storable::retrieve "board2.dat"; |
55 | while (my ($k, $v) = each %$data) { |
55 | while (my ($k, $v) = each %$data) { |
56 | $game->{$k} = $v; |
56 | $game->{$k} = $v; |
57 | } |
57 | } |
58 | $game->event_update_tree; |
58 | $game->event_update_tree; |
59 | } |
59 | } |