def test_valid_moves(self): board = solver.create_board() expected = [(1, 3, 'd'), (5, 3, 'u'), (3, 1, 'r'), (3, 5, 'l')] result = solver.valid_moves(board) for x in result: self.assertIn(x, expected)
def test_ilegal_move(self): board = solver.create_board() expected = False result = solver.valid_move(board, 1, 3, 'u') self.assertEqual(expected, result)
def test_count_32_pieces_in_starting_board(self): board = solver.create_board() expected = 32 result = solver.count_pieces(board) self.assertEqual(expected, result)
def setUp(self): self.piece = '*' self.hole = 'o' self.blank = ' ' self.board = solver.create_board()