ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Games-Go-SimpleBoard/SimpleBoard.pm
(Generate patch)

Comparing Games-Go-SimpleBoard/SimpleBoard.pm (file contents):
Revision 1.12 by elmex, Wed Jul 23 19:19:31 2008 UTC vs.
Revision 1.13 by elmex, Thu Jul 24 08:50:53 2008 UTC

276 276
277 $suicide += $self->capture ($own, $x, $y); 277 $suicide += $self->capture ($own, $x, $y);
278 278
279 ${ $_->[5] } ||= !(@capture || $suicide); 279 ${ $_->[5] } ||= !(@capture || $suicide);
280 280
281 if ($suicide) {
282 $self->{board}[$x][$y] = 0
283
281 if (!$suicide && @capture == 1) { 284 } elsif (!$suicide && @capture == 1) {
282 # possible ko. now check liberties on placed stone 285 # possible ko. now check liberties on placed stone
283 286
284 my $libs; 287 my $libs;
285 288
286 $libs++ if $x > 0 && !($board->[$x-1][$y] & $opp); 289 $libs++ if $x > 0 && !($board->[$x-1][$y] & $opp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines