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

        out = []
        for move in self.moves:
            out.append(move.dumps())
        return '/'.join(out)
示例#2
0
文件: state.py 项目: Andarin/qtpy
 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
示例#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
示例#4
0
文件: state.py 项目: Andarin/qtpy
 def dumps(self):
   """ Returns game as standard notation string """
   
   out = []
   for move in self.moves: out.append(move.dumps())
   return '/'.join(out)