ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/bin/kgsueme
Revision: 1.45
Committed: Fri Jun 27 01:21:19 2003 UTC (20 years, 11 months ago) by pcg
Branch: MAIN
Changes since 1.44: +12 -10 lines
Log Message:
*** empty log message ***

File Contents

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