def putStones(): stonesPattern = ''' 1234567890 | | | | X | X X | OX | XOO | O | OOO? | X X ''' (rank, move), expects = aiMaxmin(stonesPattern, black, black, 3)
def aiMaxmin(self, stonesPattern, who, asWho, level, expectedRank): (rank, move), expects = aiMaxmin(stonesPattern, who, asWho, level) self.assertIn(move, expects) self.assertEqual(expectedRank, rank)