示例#1
0
 def __onAmbiguousMove (self, errorManager, move):
     # This is really a fix for fics, but sometimes it is necessary
     if determineAlgebraicNotation(move) == SAN:
         self.board.popMove()
         move_ = parseSAN(self.board, move)
         lanmove = toLAN(self.board, move_)
         self.board.applyMove(move_)
         self.connection.bm.sendMove(lanmove)
     else:
         self.connection.cm.tellOpponent(
                 "I'm sorry, I wanted to move %s, but FICS called " % move +
                 "it 'Ambigious'. I can't find another way to express it, " +
                 "so you can win")
         self.connection.bm.resign()
示例#2
0
 def __onAmbiguousMove(self, errorManager, move):
     # This is really a fix for fics, but sometimes it is necessary
     if determineAlgebraicNotation(move) == SAN:
         self.board.popMove()
         move_ = parseSAN(self.board, move)
         lanmove = toLAN(self.board, move_)
         self.board.applyMove(move_)
         self.connection.bm.sendMove(lanmove)
     else:
         self.connection.cm.tellOpponent(
             "I'm sorry, I wanted to move %s, but FICS called " % move +
             "it 'Ambigious'. I can't find another way to express it, " +
             "so you can win")
         self.connection.bm.resign()