diff --git a/src/go.py b/src/go.py --- a/src/go.py +++ b/src/go.py @@ -6,7 +6,9 @@ EMPTY=0 class Go: board=[[EMPTY]*19 for i in range(19)] - def __init__(self): self.board=[[EMPTY]*19 for i in range(19)] + def __init__(self): + self.board=[[EMPTY]*19 for i in range(19)] + self.moveCount=0 def move(self,color,y,x): if self.board[x][y]!=EMPTY: return False @@ -20,6 +22,7 @@ class Go: if not self._floodFill(color,x,y): self.board[x][y]=EMPTY return False + self.moveCount+=1 return True def _floodFill(self,color,x,y):