Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 def test_ilegal_move(self):
     board = solver.create_board()
     expected = False
     result = solver.valid_move(board, 1, 3, 'u')
     self.assertEqual(expected, result)
Exemple #4
0
 def test_count_32_pieces_in_starting_board(self):
     board = solver.create_board()
     expected = 32
     result = solver.count_pieces(board)
     self.assertEqual(expected, result)
Exemple #5
0
 def setUp(self):
     self.piece = '*'
     self.hole = 'o'
     self.blank = ' '
     self.board = solver.create_board()
Exemple #6
0
 def test_ilegal_move(self):
     board = solver.create_board()
     expected = False 
     result = solver.valid_move(board, 1, 3, 'u')
     self.assertEqual(expected, result)
Exemple #7
0
 def test_count_32_pieces_in_starting_board(self):
     board = solver.create_board()
     expected = 32
     result = solver.count_pieces(board)
     self.assertEqual(expected, result)
Exemple #8
0
 def setUp(self):
     self.piece = '*'
     self.hole = 'o'
     self.blank = ' '
     self.board = solver.create_board()