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

Comparing kgsueme/bin/kgsueme (file contents):
Revision 1.10 by pcg, Thu May 29 10:35:58 2003 UTC vs.
Revision 1.23 by pcg, Fri May 30 11:53:24 2003 UTC

1#!/usr/bin/perl -I../lib/ 1#!/usr/bin/perl -I../lib/
2
3#use PApp::Util qw(dumpval); # debug only
4 2
5use Gtk; 3use Gtk;
6use Gtk::Gdk; 4use Gtk::Gdk;
7#use Gtk::Gdk::Pixbuf; 5use Gtk::Gdk::Pixbuf;
8use Gtk::Gdk::ImlibImage; 6#use Gtk::Gdk::ImlibImage;
9
10use Gnome;
11 7
12use KGS::Protocol; 8use KGS::Protocol;
13use KGS::Listener::Debug; 9use KGS::Listener::Debug;
14 10
11use Audio::Data;
12use Audio::Play;
13
15use IO::Socket::INET; 14use IO::Socket::INET;
16 15
17use Errno; 16use Errno;
18 17
19init Gnome "kgsueme"; 18init Gtk;
20 19
21$HACK = 1; # do NEVER enable. ;) 20$HACK = 1; # do NEVER enable. ;)
22 21
23our $config; 22our $config;
23our $LIBDIR = ".";
24our $IMGDIR = "images"; 24our $IMGDIR = "$LIBDIR/images";
25our $SNDDIR = "$LIBDIR/sounds";
25 26
26sub load_img { 27sub load_img {
27# new_from_file Gtk::Gdk::Pixbuf "$IMGDIR/$_[0]" 28 new_from_file Gtk::Gdk::Pixbuf "$IMGDIR/$_[0]"
28 load_image Gtk::Gdk::ImlibImage "$IMGDIR/$_[0]" 29# load_image Gtk::Gdk::ImlibImage "$IMGDIR/$_[0]"
29 or die "$IMGDIR/$_[0]: $!"; 30 or die "$IMGDIR/$_[0]: $!";
30} 31}
31 32
33my @fontchars = ('A' .. 'Z', 0 .. 9);
34
32our @black_img = load_img "b-01.png"; 35our @black_img = load_img "b-01.png";
33our @white_img = map +(load_img "w-0$_.png"), 1,2,3,4,5; 36our @white_img = map +(load_img "w-0$_.png"), 1,2,3,4,5;
37our @triangle_img = map +(load_img "triangle-$_.png"), qw(b w);
38our @square_img = map +(load_img "square-$_.png"), qw(b w);
39our @circle_img = map +(load_img "circle-$_.png"), qw(b w);
34our $board_img = load_img "woodgrain-01.jpg"; 40our $board_img = load_img "woodgrain-01.jpg";
41
42our @font = (
43 [map +(load_img "font/$_-black.png"), @fontchars],
44 [map +(load_img "font/$_-white.png"), @fontchars],
45 );
46our %fontmap;
47@fontmap{@fontchars} = (0..25 + 10);
48@fontmap{'a' .. 'z'} = (0..25);
49
50{
51 #my $audioserver = new Audio::Play(0);
52 my %sound;
53 $SIG{CHLD} = 'IGNORE';
54
55 for (qw(alarm warning move)) {
56 local $/;
57 open my $snd, "<", "$SNDDIR/$_"
58 or die "$SNDDIR: $!";
59 binmode $snd;
60
61 $sound{$_} = new Audio::Data;
62 $sound{$_}->Load($snd);
63 }
64
65 sub play_sound {
66 if (fork == 0) {
67 if (my $audioserver = new Audio::Play(1)) {
68 $audioserver->play ($sound{$_[0]});
69 }
70 Gtk->_exit(0);
71 }
72 }
73}
35 74
36{ 75{
37 use Storable (); 76 use Storable ();
38 use Scalar::Util (); 77 use Scalar::Util ();
39 78
41 80
42 my $state = -r $staterc ? Storable::retrieve($staterc) : {}; 81 my $state = -r $staterc ? Storable::retrieve($staterc) : {};
43 my @widgets; 82 my @widgets;
44 83
45 $config = $state->{config} ||= {}; 84 $config = $state->{config} ||= {};
85
86 $config{speed} = 1;#d# optimize for speed or memory?
87 $config{conserve_memory} = 0;
46 88
47 # grr... more gtk+ brokenness 89 # grr... more gtk+ brokenness
48 my %get = ( 90 my %get = (
49 hpane_position => sub { ($_[0]->children)[0]->allocation->[2] }, 91 hpane_position => sub { ($_[0]->children)[0]->allocation->[2] },
50 vpane_position => sub { ($_[0]->children)[0]->allocation->[3] }, 92 vpane_position => sub { ($_[0]->children)[0]->allocation->[3] },
51 window_size => sub { [ @{$_[0]->allocation}[2,3] ] }, 93 window_size => sub { [ @{$_[0]->allocation}[2,3] ] },
52 #window_pos => sub { die PApp::Util::dumpval [ $_[0]->get_root_origin ] }, 94 #window_pos => sub { die KGS::Listener::Debug::dumpval [ $_[0]->get_root_origin ] },
53 clist_column_widths => sub { 95 clist_column_widths => sub {
54 $_[0]{column_widths}; 96 $_[0]{column_widths};
55 }, 97 },
56 ); 98 );
57 99
137 $main->{status}->pop($context_id{$type}) if $context_id{$type}; 179 $main->{status}->pop($context_id{$type}) if $context_id{$type};
138 $main->{status}->push($context_id{$type} ||= $main->{status}->get_context_id($type), $text) if $text; 180 $main->{status}->push($context_id{$type} ||= $main->{status}->get_context_id($type), $text) if $text;
139 } 181 }
140} 182}
141 183
184if (0) {
185 use KGS::Constants;
186
187 my $board = new game size => 5;
188 $board->{board} = new KGS::Game::Board;
189 $board->{board}{board}[0][0] = MARK_B;
190 $board->{board}{board}[1][1] = MARK_GRAY_B | MARK_SMALL_W;
191 $board->{board}{board}[2][2] = MARK_W | MARK_TRIANGLE;
192 $board->{window}->show_all;
193}
194
142main Gtk; 195main Gtk;
143 196
144############################################################################# 197#############################################################################
145 198
146package kgsueme; 199package kgsueme;
240 if ($msg->{success}) { 293 if ($msg->{success}) {
241 for (keys %{$::config->{rooms}}) { 294 for (keys %{$::config->{rooms}}) {
242 $self->{roomlist}->join_room($_); 295 $self->{roomlist}->join_room($_);
243 } 296 }
244 } 297 }
245
246 warn PApp::Util::dumpval($::config);
247} 298}
248 299
249sub event_disconnect { } 300sub event_disconnect { }
250 301
251############################################################################# 302#############################################################################
446 my ($self) = @_; 497 my ($self) = @_;
447 $self->SUPER::part; 498 $self->SUPER::part;
448 499
449 delete $::config->{rooms}{$self->{channel}}; 500 delete $::config->{rooms}{$self->{channel}};
450 $self->{window}->hide_all; 501 $self->{window}->hide_all;
451 $self->event_update; 502 $self->event_update_users;
452 $self->event_update_games; 503 $self->event_update_games;
453} 504}
454 505
455sub event_join { 506sub event_join {
456 my ($self) = @_; 507 my ($self) = @_;
487 $self = $self->SUPER::new(@_); 538 $self = $self->SUPER::new(@_);
488 539
489 $self->listen($self->{conn}); 540 $self->listen($self->{conn});
490 541
491 $self->{window} = new Gtk::Window 'toplevel'; 542 $self->{window} = new Gtk::Window 'toplevel';
492 $self->{window}->set_title("KGS Game ".$self->user0." ".$self->user1); 543 $self->{window}->set_title("KGS Game ".$self->user0." ".$self->user1) if $self->{channel};#d#
493 ::state $self->{window}, "game::window", undef, window_size => [600, 500]; 544 ::state $self->{window}, "game::window", undef, window_size => [600, 500];
494 545
495 $self->{window}->signal_connect(delete_event => sub { $self->part; 1 }); 546 $self->{window}->signal_connect(delete_event => sub { $self->part; 1 });
496 547
497 $self->{window}->add(my $hpane = new Gtk::HPaned); 548 $self->{window}->add(my $hpane = new Gtk::HPaned);
498 ::state $hpane, "game::hpane", undef, hpane_position => 500; 549 ::state $hpane, "game::hpane", undef, hpane_position => 500;
499 550
500 $::config{aa} = 0; 551 Gtk::Widget->push_visual (Gtk::Gdk::Rgb->get_visual);
501 $self->{canvas} = $::config{aa} ? new_aa Gnome::Canvas : new Gnome::Canvas; 552 Gtk::Widget->push_colormap (Gtk::Gdk::Rgb->get_cmap);
502 $hpane->add($self->{canvas}); 553 $hpane->pack1(($self->{canvas} = new Gtk::DrawingArea), 1, 1);
554 Gtk::Widget->pop_colormap;
555 Gtk::Widget->pop_visual;
503 556
504 { 557 $self->{canvas}->signal_connect(configure_event => \&configure_event, $self);
505 my $line_colour = $::config{line_colour} || "darkbrown"; 558 $self->{canvas}->signal_connect(expose_event => \&expose_event, $self);
506 my $border = 0.1;
507 my $ofs = 0.5 / $self->{size};
508
509 $self->{canvas}->set_pixels_per_unit(1000);
510 $self->{canvas}->set_scroll_region(-$border,-$border,1+$border,1+$border);
511 559
512 $self->{canvas}->signal_connect(size_allocate => sub {
513 my ($w, $h) = @{$_[1]}[2,3];
514
515 $self->{canvas}->set_pixels_per_unit(($w > $h ? $h : $w)/(1+$border*2));
516
517 1;
518 });
519
520 my $croot = $self->{canvas}->root;
521 my $cgroup = $croot; #->new($croot, "Gnome::CanvasGroup");
522
523 if ($::board_img) {
524 $cgroup->new($cgroup, "Gnome::CanvasImage",
525 x => -$border, y => -$border,
526 width => 1+$border*2, height => 1+$border*2,
527 image => $::board_img,
528 anchor => "nw"
529 );
530 } else {
531 $cgroup->new($cgroup, "Gnome::CanvasRect",
532 x1 => -$border, x2 => 1+$border,
533 y1 => -$border, y2 => 1+$border,
534 outline_color => "black",
535 fill_color => "brown",
536 width_pixels => 2,
537 );
538 }
539
540 my $a = "A";
541 for my $i (1 .. $self->{size}) { # one more iteration for the last lines
542 my $k = $i / $self->{size} - $ofs;
543
544 $cgroup->new($cgroup, "Gnome::CanvasLine",
545 points => [ $k,$ofs, $k,1-$ofs ],
546 fill_color => $line_colour,
547 width_pixels => 1);
548
549 $cgroup->new($cgroup, "Gnome::CanvasLine",
550 points => [ $ofs,$k, 1-$ofs,$k ],
551 fill_color => $line_colour,
552 width_pixels => 1);
553
554 for ( [$k,-$border*0.5,$a], [$k,1+$border*0.5,$a], [-$border*0.5,$k,$i], [1+$border*0.5,$k,$i] ) {
555 my ($x, $y, $text) = @$_;
556
557 my $text = $cgroup->new($cgroup, "Gnome::CanvasText",
558 x => 0, y => 0, text => $text,
559 justification => "center",
560 anchor => "center",
561 font => $::config{aa} ? "-*-helvetica-medium-r-*--34-*" : "-*-helvetica-bold-r-*--17-*",
562 fill_color => $line_colour);
563
564 $text->affine_relative($border*0.015,0, 0,$border*0.015, $x,$y);
565 }
566
567 $a++;
568 }
569
570 my $stones = [[]];
571
572 for my $x (1 .. $self->{size}) {
573 my $xk = $x / $self->{size} - $ofs;
574 for my $y (1 .. $self->{size}) {
575 my $yk = $y / $self->{size} - $ofs;
576
577 my $col = $stones->[$x-1][$y-1] = [];
578
579 if (1) {
580 $col->[0] =
581 $cgroup->new($cgroup, "Gnome::CanvasImage",
582 x => $xk, y => $yk,
583 width => $ofs*2, height => $ofs*2,
584 image => $::black_img[int rand @::black_img],
585 anchor => "center");
586 $col->[1] =
587 $cgroup->new($cgroup, "Gnome::CanvasImage",
588 x => $xk, y => $yk,
589 width => $ofs*2, height => $ofs*2,
590 image => $::white_img[int rand @::white_img],
591 anchor => "center");
592 } else {
593 die "need pixmaps\n";
594 # too large, scale has NO effect
595 $col->[0] =
596 $cgroup->new($cgroup, "Gnome::CanvasEllipse",
597 x1 => $xk, x2 => $xk + 0.001,
598 y1 => $yk, y2 => $yk + 0.001,
599 outline_color => "black", width_pixels => 2,
600 fill_color => "black");
601 $col->[1] =
602 $cgroup->new($cgroup, "Gnome::CanvasEllipse",
603 x1 => $xk, x2 => $xk + 0.001,
604 y1 => $yk, y2 => $yk + 0.001,
605 outline_color => "black", width_pixels => 2,
606 fill_color => "white");
607 }
608 }
609 }
610
611 $self->{board_gfx}{stones} = $stones;
612 }
613
614 $hpane->add(my $vpane = new Gtk::VPaned); 560 $hpane->pack2((my $vpane = new Gtk::VPaned), 0, 0);
615 ::state $vpane, "game", $self->{name}, vpane_position => 80; 561 ::state $vpane, "game", $self->{name}, vpane_position => 80;
616 562
617 $vpane->add(my $sw = new Gtk::ScrolledWindow); 563 $vpane->add(my $sw = new Gtk::ScrolledWindow);
618 $sw->set_policy("automatic", "always"); 564 $sw->set_policy("automatic", "always");
619 565
656 $self->SUPER::part; 602 $self->SUPER::part;
657 603
658 $self->{window}->hide; 604 $self->{window}->hide;
659} 605}
660 606
607sub configure_event {
608 my ($widget, $self, $event) = @_;
609 delete $self->{stack};
610 delete $self->{background};
611 $self->repaint_board;
612 1;
613}
614
615sub INTERP_NEAREST (){ 1 }
616sub INTERP_TILES (){ 1 }
617sub INTERP_BILINEAR (){ 2 }
618sub INTERP_HYPER (){ 3 }
619
620sub new_pixbuf {
621 my ($w, $h, $alpha, $clear) = @_;
622
623 my $pixbuf = new Gtk::Gdk::Pixbuf 'rgb', $alpha, 8, $w, $h;
624
625 if ($clear) { # damn, need to clear it ourselves
626 my $row = "\x00\x00\x00\x00" x $w;
627 $pixbuf->put_pixels ($row, $_, 0) for 0 .. $h - 1;
628 }
629
630 $pixbuf;
631}
632
633sub scale_pixbuf {
634 my ($src, $w, $h, $mode) = @_;
635
636 my $dst = new_pixbuf $w, $h, 1;
637
638 $src->scale(
639 $dst, 0, 0, $w, $h, 0, 0,
640 $w / $src->get_width, $h / $src->get_height,
641 $mode,
642 );
643
644 $dst;
645}
646
647# create a stack of stones
648sub create_stack {
649 my ($self, $mark, $size, $rand) = @_;
650
651 my $shadow = $size * 0.06;
652
653 my $c = \$self->{stack}{$mark};
654 unless ($$c) {
655 for my $stone ($mark & (MARK_W | MARK_GRAY_W) ? @::white_img : @::black_img) {
656 my $base = new_pixbuf $size + $shadow, $size + $shadow, 1, 1;
657
658 # zeroeth the shadow
659 $::black_img[0]->composite (
660 $base, $shadow, $shadow, $size, $size, $shadow-0.5, $shadow-0.5,
661 $size / $stone->get_width, $size / $stone->get_height,
662 $::config{speed} ? INTERP_NEAREST : INTERP_TILES, 128
663 );
664
665 # first the big stones
666 for ([MARK_B, 255],
667 [MARK_W, 255],
668 [MARK_GRAY_B, 128],
669 [MARK_GRAY_W, 128]) {
670 my ($mask, $alpha) = @$_;
671 if ($mark & $mask) {
672 $stone->composite (
673 $base, 0, 0, $size, $size, -0.5, -0.5,
674 $size / $stone->get_width, $size / $stone->get_height,
675 $::config{speed} ? INTERP_NEAREST : INTERP_HYPER, $alpha
676 );
677 }
678 }
679
680 # then the samll stones
681 for ([MARK_SMALL_B, $::black_img[$rand % @::black_img]],
682 [MARK_SMALL_W, $::white_img[$rand % @::white_img]]) {
683 my ($mask, $img) = @$_;
684 if ($mark & $mask) {
685 $img->composite (
686 $base, ($size / 4) x2, (int ($size / 2 + 0.5)) x2, ($size / 4 - 0.5) x 2,
687 $size / $img->get_width / 2, $size / $img->get_height / 2,
688 $::config{speed} ? INTERP_NEAREST : INTERP_HYPER, 192
689 );
690 }
691 }
692
693 # and lastly any markers (labels NYI)
694 my $dark_bg = ! ! ($mark & (MARK_B | MARK_GRAY_B));
695
696 for ([MARK_CIRCLE, $::circle_img[$dark_bg]],
697 [MARK_TRIANGLE, $::triangle_img[$dark_bg]],
698 [MARK_SQUARE, $::square_img[$dark_bg]]) {
699 my ($mask, $img) = @$_;
700 if ($mark & $mask) {
701 $img->composite (
702 $base, 0, 0, $size, $size, -0.5, -0.5,
703 $size / $img->get_width, $size / $img->get_height,
704 $::config{speed} ? INTERP_NEAREST : INTERP_HYPER, 255
705 );
706 }
707 }
708
709 push @$$c, $base;
710 }
711 }
712
713 $$c->[$rand % @$$c];
714}
715
716sub pixbuf_text {
717 my ($pixbuf, $colour, $x, $y, $height, $text) = @_;
718
719 my $c = $::font[$colour][$::fontmap{substr $text, 0, 1}];
720
721 if ($c) {
722 my ($w, $h) = ($c->get_width, $c->get_height);
723 my $s = ($height-1) / ($h-1);
724
725 $x -= $w * $s * 0.5;
726 $y -= $height * 0.5;
727
728 $c->composite ($pixbuf,
729 $x, $y, $w*$s+0.5, $height+0.5, $x-0.5, $y-0.5, $s, $s,
730 $::config{speed} ? INTERP_NEAREST : INTERP_BILINEAR, 192);
731
732 } else {
733 warn "unable to render character '$text'";
734 }
735}
736
737my $black_pb;
738
739sub pixbuf_rect {
740 my ($pb, $x1, $y1, $x2, $y2) = @_;
741 # we fake lines by... an unspeakable method :/
742 unless ($black_pb) {
743 $black_pb = new_pixbuf 1, 1, 0, 0;
744 $black_pb->put_pixels ("\x44\x11\x11", 0, 0);
745 }
746
747 $black_pb->composite ($pb, $x1, $y1, $x2 - $x1 + 1, $y2 - $y1 + 1, $x1, $y1, 1, 1, INTERP_NEAREST, 192);
748}
749
750sub repaint_board {
751 my ($self) = @_;
752 my $canvas = $self->{canvas};
753
754 return unless $self->{board};
755
756 my ($w, $h) = @{$canvas->allocation}[2,3];
757
758 my $s = $w > $h ? $h : $w;
759
760 $self->{offsets} = [int (($w - $s) / 2), int (($h - $s) / 2), $s];
761
762 my $size = $self->{size};
763
764 my $border = int ($s / $size);
765 my $s2 = $s - $border * 2;
766 my $edge = int ($s2 / $size * 0.97);
767 my $ofs = int ($edge / 2);
768
769 my @k = map int ($s2 * $_ / $size - $ofs + $border + 0.5), 0 .. $size;
770
771 my $pixbuf;
772
773 if ($self->{background}) {
774 $pixbuf = $self->{background}->copy;
775 } else {
776 my ($bw, $bh) = ($::board_img->get_width, $::board_img->get_height);
777
778 if ($s < $bw && $s < $bh) {
779 $pixbuf = new_pixbuf $s, $s, $::config{conserve_memory} ? 0 : 1, 0;
780 $::board_img->copy_area (0, 0, $s, $s, $pixbuf, 0, 0);
781 } else {
782 $pixbuf = scale_pixbuf $::board_img, $s, $s, $::config{speed} ? INTERP_NEAREST : INTERP_TILES;
783 }
784
785 my $linew = int ($s / 500);
786
787 my $a = "A";
788 for my $i (1 .. $size) {
789 pixbuf_rect $pixbuf, $k[$i] - $linew, $k[1] - $linew, $k[$i] + $linew, $k[$size] + $linew;
790 pixbuf_rect $pixbuf, $k[1] - $linew, $k[$i] - $linew, $k[$size] + $linew, $k[$i] + $linew;
791
792 pixbuf_text $pixbuf, 0, $k[$i], ($ofs +$border) / 2, $ofs, $a;
793 pixbuf_text $pixbuf, 0, $k[$i], $s2 + $border + $ofs / 2, $ofs, $a;
794 pixbuf_text $pixbuf, 0, ($ofs + $border) / 2, $k[$i], $ofs, $size - $i + 1;
795 pixbuf_text $pixbuf, 0, $s2 + $border + $ofs / 2, $k[$i], $ofs, $size - $i + 1;
796
797 $a++;
798 $a++ if $a eq "I"; # not correct, instead of AA AB, we should get HH JJ KK...
799 }
800
801 unless ($::config->{conserve_memory}) {
802 $self->{background} = $pixbuf;
803 $pixbuf = $pixbuf->copy;
804 }
805 }
806
807 $self->{pixbuf} = $pixbuf;
808
809 # hoshi-points(!)#d#
810 # caching of empty board gfx(!)#d#
811
812 for my $x (1 .. $size) {
813 for my $y (1 .. $size) {
814 my $mark = $self->{board}{board}[$x-1][$y-1];
815
816 if ($mark) {
817 my ($dx, $dy) = ($k[$x] - $ofs, $k[$y] - $ofs);
818 my $pb = $self->create_stack($mark, $edge, $x * 17 + $y * 11 );
819
820 $pb->composite ($pixbuf, $dx, $dy, $pb->get_width, $pb->get_height,
821 $dx, $dy, 1, 1, $::config{speed} ? INTERP_NEAREST : INTERP_NEAREST, 255);
822
823 #my ($pm, $bm) = $self->create_stack($gc, $mark, $edge, $x * 17 + $y * 11 );
824
825 #$gc->set_clip_mask ($bm);
826 #$gc->set_clip_origin ($dx, $dy);
827 #$pixmap->draw_pixmap ($gc, $pm, 0, 0, $dx, $dy, $edge, $edge);
828 }
829 }
830 }
831}
832
833sub expose_event {
834 my ($widget, $self, $event) = @_;
835
836 $self->{pixbuf} or return;
837
838 my ($ox, $oy, $s) = @{$self->{offsets}};
839
840 my ($x, $y, $w, $h) =
841 @{Gtk::Gdk::Rectangle->intersect(
842 $event->{area},
843 [$ox, $oy, $s, $s]
844 )};
845
846 if (defined $x) {
847 $self->{pixbuf}->render_to_drawable ($self->{canvas}->window, $self->{canvas}->style->white_gc,
848 $x - $ox, $y - $oy, $x, $y, $w, $h);
849 #$self->{canvas}->window->draw_pixmap (
850 # $self->{canvas}->style->white_gc,
851 # $self->{pixmap},
852 # $x - $ox, $y - $oy, $x, $y, $w, $h,
853 #);
854 }
855 1;
856}
857
661sub event_update_tree { 858sub event_update_tree {
662 my ($self) = @_; 859 my ($self) = @_;
663 860
664 my $board = new KGS::Game::Board $self->{size}; 861 $self->{board} = new KGS::Game::Board $self->{size};
665 $board->interpret_path ($self->get_path); 862 $self->{board}->interpret_path ($self->get_path);
666 863
667 for my $x (0 .. $self->{size} - 1) { 864 $self->repaint_board;
668 for my $y (0 .. $self->{size} - 1) {
669 my $v = $board->{board}[$x][$y];
670 865
671 $v & MARK_B 866 # force a redraw (not perfect(?))
672 ? $self->{board_gfx}->{stones}->[$x][$y][0]->show 867 expose_event $self->{canvas}, $self, { area => $self->{canvas}->allocation };
673 : $self->{board_gfx}->{stones}->[$x][$y][0]->hide;
674 $v & MARK_W
675 ? $self->{board_gfx}->{stones}->[$x][$y][1]->show
676 : $self->{board_gfx}->{stones}->[$x][$y][1]->hide;
677 }
678 }
679 868
680 $self->{text}->backward_delete($self->{text}->get_length); 869 $self->{text}->backward_delete($self->{text}->get_length);
681 $self->{text}->insert(undef, undef, undef, $board->{comment}.PApp::Util::dumpval([$board->{time},$board->{captures}])); 870 $self->{text}->insert(undef, undef, undef, KGS::Listener::Debug::dumpval([$self->{board}{time},$self->{board}{captures}]). $self->{board}{comment});
871}
872
873sub event_move {
874 ::play_sound "move";
682} 875}
683 876
6841; 8771;
685 878
686 879

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines