Fixed ko checking

This commit is contained in:
Anna Rose 2012-04-18 17:57:58 -04:00
parent 1d57901098
commit 2fd0523078

View File

@ -180,7 +180,7 @@ class Goban:
self.white_captures += captures
# Check for ko
if captures == 1 and self._num_liberties(pos, color):
if captures == 1 and self._num_liberties(pos, color) == 1:
# find the empty point
for p in self._neighbors(pos):
if self.board[p] == Goban.EMPTY: