… | |
… | |
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); |