BigHolesRandomMaze¶
This module provides functionality for generating mazes with large holes in them, which can be used in various game scenarios.
It extends RandomMaze to create a specific type of maze with larger holes, enhancing the gameplay experience by introducing more complex navigation challenges.
- class BigHolesRandomMaze(cell_percentage, *args, **kwargs)[source]¶
(This class inherits from
RandomMaze).This class defines a random maze with big holes here and there. The maze is created by removing random cells from a full maze, and making sure the maze remains connected. Cells are removed with a larger probability if they are close to an already existing hole.
You can use this class to create a maze with this algorithm. However, if you just want to play a game, you can use the
Gameclass instead, which will create a maze for you. Just make sure to set therandom_maze_algorithmparameter toRandomMazeAlgorithm.BIG_HOLESwhen creating the game.- __init__(cell_percentage, *args, **kwargs)[source]¶
Initializes a new instance of the class, and generates the maze.
- Parameters:
cell_percentage (
float) – Percentage of cells to be reachable.*args (
object) – Arguments to pass to the parent constructor.**kwargs (
object) – Keyword arguments to pass to the parent constructor.