Пример #1
0
 def played_oppo(self, line):
     try:
         return (2, self.log.get_entity(state('played_oppo'), 'name', line))
     except SearchError:
         pass
     else:
         return None
Пример #2
0
 def game_beginning(self):
     self._refresh()
     games = self.log.search(0, state('game_begin'))
     if games != []:
         return games[-1][1]
     else:
         return -1
Пример #3
0
 def next_turn(self, line):
     try:
         self.log.get_entity(state('turn'), '', line)
         return True
     except SearchError:
         pass
     else:
         return False