def test(self): tictactoe_board = TicTacToeBoard(4, False, None) tictactoe_board.board[0][0] = 1 tictactoe_board.board[1][2] = 2 self.assertEqual(tictactoe_board.square(0, 0), PLAYERX) self.assertEqual(tictactoe_board.square(1, 2), PLAYERO) self.assertEqual(tictactoe_board.square(0, 1), EMPTY)
def test(self): tictactoe_board = TicTacToeBoard(4, False, None) tictactoe_board.move(0, 0, PLAYERX) tictactoe_board.move(3, 0, PLAYERX) tictactoe_board.move(1, 2, PLAYERO) tictactoe_board.move(1, 3, PLAYERO) tictactoe_board.move(1, 3, PLAYERX) self.assertEqual(tictactoe_board.square(0, 0), PLAYERX) self.assertEqual(tictactoe_board.square(3, 0), PLAYERX) self.assertEqual(tictactoe_board.square(1, 2), PLAYERO) self.assertEqual(tictactoe_board.square(1, 3), PLAYERO)