ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/bin/kgsueme
Revision: 1.44
Committed: Tue Jun 24 02:31:05 2003 UTC (20 years, 11 months ago) by pcg
Branch: MAIN
Changes since 1.43: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/usr/bin/perl
2
3 use Glib;
4 use Gtk2;
5
6 use KGS::Protocol;
7 use KGS::Listener::Debug;
8
9 use Audio::Data;
10 use Audio::Play;
11
12 use IO::Socket::INET;
13 use List::Util;
14 use Errno;
15
16 use Storable;
17 use Carp;
18
19 init Gtk2;
20
21 $SIG{QUIT} = sub { Carp::confess "SIGQUIT" };
22
23 our $HACK = 1; # do NEVER enable. ;)
24 our $DEBUG_EXPOSE = 0;
25
26 if ($HACK) {
27 $KGS::debug = 1;
28 }
29
30 our $VERSION = "0.1";
31
32 our $config;
33 our $LIBDIR = ".";
34 our $APPDIR = "$LIBDIR/kgsueme";
35 our $IMGDIR = "$LIBDIR/images";
36 our $SNDDIR = "$LIBDIR/sounds";
37
38 for (qw(util.pl gtk.pl image.pl sound.pl gamelist.pl userlist.pl challenge.pl
39 board.pl game.pl room.pl roomlist.pl appwin.pl)) {
40 print "loading module $_\n";
41 require "$APPDIR/$_";
42 }
43
44 our $appwin = new appwin;
45
46 if (0) {
47 use KGS::Constants;
48
49 for (19) {
50 my $board = new game size => $_;# %{Storable::retrieve "testboard.storable"};
51
52 if (1) {
53 $board->{cur_board} = new KGS::Game::Board;
54 $board->{cur_board}{board}[0][0] = MARK_B;
55 $board->{cur_board}{board}[1][1] = MARK_GRAY_B | MARK_SMALL_W;
56 $board->{cur_board}{board}[2][2] = MARK_W | MARK_TRIANGLE;
57 $board->{cur_board}{board}[1][2] = MARK_B | MARK_LABEL;
58 $board->{cur_board}{label}[1][2] = "198";
59 $board->{cur_board}{board}[0][2] = MARK_W | MARK_LABEL;
60 $board->{cur_board}{label}[0][2] = "AWA";
61 }
62 $board->{window}->show_all;
63 $board->{board}->set_board ($board->{cur_board});
64 }
65 }
66
67 main Gtk2;
68
69 $appwin->destroy;
70
71 Gtk2->main_iteration while Gtk2->events_pending;
72
73 1;
74
75