def test_can_set_move_on_empty_cell(self): ticTacToeSetup = TicTacToeSetup() ticTacToeSetup.board = [[0, 0, 0], [0, 0, 0], [1, -1, 1]] self.assertEqual(ticTacToeSetup.board[0][0], 0) result = ticTacToeSetup.set_move(0, 0, 1) self.assertEqual(result, True) self.assertEqual(ticTacToeSetup.board[0][0], 1)
def test_cannot_set_move_on_filled_cell(self): ticTacToeSetup = TicTacToeSetup() ticTacToeSetup.board = [[0, 0, 0], [0, 0, 0], [1, -1, 1]] result = ticTacToeSetup.set_move(2, 2, 1) self.assertEqual(result, False)