def test_is_valid_position_large(self):
     game = self.game_large
     valid_positions = [(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1),
                        (1, 2), (1, 3), (2, 0), (2, 1), (2, 2), (2, 3),
                        (3, 0), (3, 1), (3, 2), (3, 3)]
     for position in valid_positions:
         self.assertTrue(_position_is_valid(game, position))
 def test_is_valid_position(self):
     valid_positions = [
         (0,0), (0,1), (0,2),
         (1,0), (1,1), (1,2),
         (2,0), (2,1), (2,2),
     ]
     for position in valid_positions:
         self.assertTrue(_position_is_valid(position))
Beispiel #3
0
 def test_is_valid_position(self):
     valid_positions = [
         (0,0), (0,1), (0,2),
         (1,0), (1,1), (1,2),
         (2,0), (2,1), (2,2),
     ]
     for position in valid_positions:
         self.assertTrue(_position_is_valid(position))
Beispiel #4
0
 def test_is_valid_position_invalid(self):
     invalid_positions = [(2, 3), (3, 2), (3, 3), (9, 9), (-1, -1), 1,
                          "something", False, (0, 0, 0)]
     for position in invalid_positions:
         self.assertFalse(_position_is_valid(position))
 def test_is_valid_position_invalid(self):
     invalid_positions = [
         (2,3), (3,2), (3,3), (9,9), (-1,-1), 1, "something", False, (0,0,0), ("st", 1)
     ]
     for position in invalid_positions:
         self.assertFalse(_position_is_valid(position))
 def test_is_valid_position_invalid_large(self):
     n = len(self.game_large['board'])
     invalid_positions = [(n, 3), (n, 2), (n, 3), (9, 9), (-1, -1), 1,
                          "something", False, (0, 0, 0)]
     for position in invalid_positions:
         self.assertFalse(_position_is_valid(self.game_large, position))