def test_hasPlayerWon_RowTwo(self): #no winner #Make Class win = WinLogic() player = "Player1" win.SetPlayer(player) win.ClearMatrix() for i in range(3): win.SetGrid(player,i,1) self.assertTrue(win.hasPlayerWon(player)) #win case 5
def test_hasPlayerWon_LoseCaseOne(self): #no winner #Make Class win = WinLogic() player = "Player1" win.SetPlayer(player) win.ClearMatrix() for i in range(2): win.SetGrid(player,0,i) self.assertFalse(win.hasPlayerWon(player)) #lose case 1
def test_hasPlayerWon_DiagOne(self): #no winner #Make Class win = WinLogic() player = "Player1" win.SetPlayer(player) win.ClearMatrix() win.SetGrid(player,0,0) win.SetGrid(player,1,1) win.SetGrid(player,2,2) self.assertTrue(win.hasPlayerWon(player)) #win case 7