예제 #1
0
 def test_multiple_wins_win(self):
     self.assertTrue(ticTacToe.doesWin([
         ["0", "", "0"],
         ["0", "0", "0"],
         ["0", "0", "0"]],
     "0"))
예제 #2
0
 def test_draw_no_win(self):
     self.assertFalse(ticTacToe.doesWin([["X", "0", "X"], ["0", "X", "0"], ["0", "X", "0"]], "X"))
     self.assertFalse(ticTacToe.doesWin([["X", "0", "X"], ["0", "X", "0"], ["0", "X", "0"]], "0"))
예제 #3
0
 def test_thrid_col_win(self):
     self.assertTrue(ticTacToe.doesWin([
         ["X", "", "0"],
         ["0", "", "0"],
         ["0", "0", "0"]],
     "0"))
예제 #4
0
 def test_second_col_win(self):
     self.assertTrue(ticTacToe.doesWin([
         ["X", "0", "X"],
         ["", "0", "0"],
         ["", "0", "X"]],
     "0"))
예제 #5
0
 def test_first_col_win(self):
     self.assertTrue(ticTacToe.doesWin([
         ["X", "", "X"],
         ["X", "", "0"],
         ["X", "", "X"]],
     "X"))
예제 #6
0
 def test_secondary_diagonal_win(self):
     self.assertTrue(ticTacToe.doesWin([
         ["X", "0", "0"], 
         ["0", "0", "0"], 
         ["0", "", "X"]], 
     "0"))
예제 #7
0
 def test_empty_board_no_win(self):
     self.assertFalse(ticTacToe.doesWin([["", "", ""], ["", "", ""], ["", "", ""]], "0"))
     self.assertFalse(ticTacToe.doesWin([["", "", ""], ["", "", ""], ["", "", ""]], "X"))