--- Games-Go-SimpleBoard/SimpleBoard.pm 2008/06/25 20:49:38 1.10 +++ Games-Go-SimpleBoard/SimpleBoard.pm 2008/07/23 19:19:31 1.12 @@ -102,6 +102,10 @@ my $class = shift; my $size = shift; + unless ($size > 0) { + Carp::croak ("no board size given!"); + } + bless { max => $size - 1, size => $size, @@ -313,7 +317,8 @@ my $board = $self->{board}; - return if $board->[$x][$y] & (MARK_B | MARK_W | MARK_KO); + return if $board->[$x][$y] & (MARK_B | MARK_W | MARK_KO) + && !($board->[$x][$y] & MARK_GRAYED); if ($may_suicide) { return 1;