def reset(self): """ empty the board. """ TwoPlayerGame.reset(self) self.movesDone = 0 self.b = {} for p in self._iterPos(): self.b[p] = self.EMPTY
def reset(self): """ empty the board. """ TwoPlayerGame.reset(self) self.movesDone = 0 self.b = {} for p in self._iterPos(): self.b[p] = self.EMPTY # which stone belongs to which group self.groups = {} # how many liberties does each group have self.liberties = {}