ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/bin/kgsueme
(Generate patch)

Comparing kgsueme/bin/kgsueme (file contents):
Revision 1.41 by pcg, Sun Jun 22 20:47:10 2003 UTC vs.
Revision 1.51 by pcg, Fri Jul 25 03:50:32 2003 UTC

25 25
26if ($HACK) { 26if ($HACK) {
27 $KGS::debug = 1; 27 $KGS::debug = 1;
28} 28}
29 29
30BEGIN {
30our $VERSION = "0.1"; 31 our $VERSION = "0.1";
31 32
32our $config; 33 our $config;
33our $LIBDIR = "."; 34 our $LIBDIR = ".";
34our $APPDIR = "$LIBDIR/kgsueme"; 35 our $APPDIR = "$LIBDIR/kgsueme";
35our $IMGDIR = "$LIBDIR/images"; 36 our $IMGDIR = "$LIBDIR/images";
36our $SNDDIR = "$LIBDIR/sounds"; 37 our $SNDDIR = "$LIBDIR/sounds";
37 38
38for (qw(util.pl gtk.pl image.pl sound.pl gamelist.pl userlist.pl challenge.pl 39 for (qw(util.pl gtk.pl chat.pl image.pl sound.pl user.pl gamelist.pl userlist.pl challenge.pl
39 board.pl game.pl room.pl roomlist.pl appwin.pl)) { 40 board.pl game.pl room.pl roomlist.pl app.pl)) {
40 print "loading module $_\n";
41 require "$APPDIR/$_"; 41 require "$APPDIR/$_";
42 }
42} 43}
43 44
44our $appwin = new appwin; 45our $app = new app;
45 46
46if (1 && -f "testboard.storable") { 47if (0) {
47 use KGS::Constants; 48 use KGS::Constants;
48 49
49 for (19) { 50 for (19) {
50 my $board = new game size => $_;# %{Storable::retrieve "testboard.storable"}; 51 my $board = new game size => $_;# %{Storable::retrieve "testboard.storable"};
51 52
52 if (1) { 53 if (1) {
53 $board->{cur_board} = new KGS::Game::Board; 54 $board->{cur_board} = new KGS::Game::Board;
55 my @x = (
56 #MARK_B,
57 #MARK_W,
58 #MARK_GRAY_B | MARK_SMALL_W,
59 #MARK_GRAY_W | MARK_SMALL_B,
60 #MARK_W | MARK_TRIANGLE,
61 0, 0, 0,
62 );
63 for $x (0..18) {
64 for $y (0..18) {
65 $board->{cur_board}{board}[$x][$y] =
66 $x[rand @x];
67 }
68 }
69
54 $board->{cur_board}{board}[0][0] = MARK_B; 70 $board->{cur_board}{board}[0][0] = MARK_B;
55 $board->{cur_board}{board}[1][1] = MARK_GRAY_B | MARK_SMALL_W; 71 $board->{cur_board}{board}[1][1] = MARK_GRAY_B | MARK_SMALL_W;
56 $board->{cur_board}{board}[2][2] = MARK_W | MARK_TRIANGLE; 72 $board->{cur_board}{board}[2][2] = MARK_W | MARK_TRIANGLE;
57 $board->{cur_board}{board}[1][2] = MARK_B | MARK_LABEL; 73 $board->{cur_board}{board}[1][2] = MARK_B | MARK_LABEL;
58 $board->{cur_board}{label}[1][2] = "198"; 74 $board->{cur_board}{label}[1][2] = "198";
64 } 80 }
65} 81}
66 82
67main Gtk2; 83main Gtk2;
68 84
69$appwin->destroy; 85$app->destroy;
70 86
71Gtk2->main_iteration while Gtk2->events_pending; 87Gtk2->main_iteration while Gtk2->events_pending;
72 88
731; 891;
74 90

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines