예제 #1
0
 def __repr__(self):
     B = np.copy(self.gameState).astype(object)
     for n, p in SYMBOLS.iteritems():
         B[B == n] = p
     return repr(B)
예제 #2
0
 def winner(self):
     for p in filter(lambda p: p != 0, SYMBOLS.iterkeys()):
         if self.is_win(p):
             return p
     return None