Beispiel #1
0
 def can_win(color):
     if self.gamemodel.timed:
         return playerHasMatingMaterial(self.gamemodel.boards[-1], color) and \
             self.gamemodel.timemodel.getPlayerTime(color) > 0
     else:
         return playerHasMatingMaterial(self.gamemodel.boards[-1],
                                        color)
Beispiel #2
0
 def can_win(color):
     if self.gamemodel.timed:
         return playerHasMatingMaterial(self.gamemodel.boards[-1], color) and \
             self.gamemodel.timemodel.getPlayerTime(color) > 0
     else:
         return playerHasMatingMaterial(self.gamemodel.boards[-1],
                                        color)