Ejemplo n.º 1
0
    def test_random_conf(self):
        game_map = Map(10, 10)

        maze_field_placer = MazeFieldPlacerMixin()
        maze_field_placer.place_blocks(game_map, count=1000)

        positions = set()
        for x, y in permutations(range(1, 9, 2), 2):
            positions.add((x, y))
            positions.add((y, x))

        for position in positions:
            self.assertIsInstance(
                game_map[position],
                BlockField
            )
Ejemplo n.º 2
0
 def test_check_place_args(self):
     with self.assertRaises(ConfigurationError):
         MazeFieldPlacerMixin._check_place_args(None, None, None)