Beispiel #1
0
 def test_isCatsGame_CaseFalse_BoardNotFull(self):
     win = WinLogic()
     player1 = "Player1"
     player2 = "Player2"
     win.SetPlayer(player1)
     win.ClearMatrix()
     win.SetGrid(player1, 2, 0)
     win.SetGrid(player1, 2, 2)
     win.SetGrid(player2, 0, 0)
     win.SetGrid(player2, 1, 1)
     win.SetGrid(player2, 1, 2)
     win.SetGrid(player2, 2, 1)
     self.assertFalse(win.isCatsGame(player1, player2))
Beispiel #2
0
 def test_isCatsGame_CaseTrue(self):
     win = WinLogic()
     player1 = "Player1"
     player2 = "Player2"
     win.SetPlayer(player1)
     win.ClearMatrix()
     win.SetGrid(player1, 0, 1)
     win.SetGrid(player1, 0, 2)
     win.SetGrid(player1, 1, 0)
     win.SetGrid(player1, 2, 0)
     win.SetGrid(player1, 2, 2)
     win.SetGrid(player2, 0, 0)
     win.SetGrid(player2, 1, 1)
     win.SetGrid(player2, 1, 2)
     win.SetGrid(player2, 2, 1)
     self.assertTrue(win.isCatsGame(player1, player2))