Example #1
0
    def dumps(self):
        """ Returns game as standard notation string """

        out = []
        for move in self.moves:
            out.append(move.dumps())
        return '/'.join(out)
Example #2
0
 def valid_move(self, move):
   """ Determines if move can be played on the current game state """
   
   moves = self.get_valid_moves()
   notation = move.dumps()
   for m in moves:
     if m == notation: return True
   return False
Example #3
0
    def valid_move(self, move):
        """ Determines if move can be played on the current game state """

        moves = self.get_valid_moves()
        notation = move.dumps()
        for m in moves:
            if m == notation: return True
        return False
Example #4
0
 def dumps(self):
   """ Returns game as standard notation string """
   
   out = []
   for move in self.moves: out.append(move.dumps())
   return '/'.join(out)