Exemplo n.º 1
0
def putStones():
    stonesPattern =         '''  1234567890
                                |               
                                |               
                                |               
                                |       X       
                                |    X X        
                                |     OX        
                                |     XOO       
                                |       O       
                                |      OOO?     
                                |       X X   
                                '''

    (rank, move), expects = aiMaxmin(stonesPattern, black, black, 3)
Exemplo n.º 2
0
 def aiMaxmin(self, stonesPattern, who, asWho, level, expectedRank):
     (rank, move), expects = aiMaxmin(stonesPattern, who, asWho, level)
     self.assertIn(move, expects)
     self.assertEqual(expectedRank, rank)