An interactive terminal-based maze generator and game written in Python. The project generates random mazes with animated visualization and allows players to navigate through the maze to reach the exit.

git clone https://github.com/Kobe-Erauw/mazeGenerator
cd mazeGenerator
pip install -r requirements.txt
Start the game by running the main file:
python main.py
You will be prompted to enter:
z + Enter - Move ups + Enter - Move downd + Enter - Move rightq + Enter - Move leftNote: After each direction input, press Enter to confirm the move.
Navigate your character (X) from the starting position (top-left) to the destination (#, bottom-right). The game provides feedback when you attempt to move into a wall.
maze-game/
│
├── main.py # Application entry point
├── Field.py # Contains Field class for maze management
├── Cell.py # Contains Cell class for individual cells
├── Player.py # Contains Player class for player logic
├── Position.py # Contains Position and Direction classes
├── requirements.txt # Python dependencies
└── README.md # Project documentation
The project uses a recursive backtracking algorithm (depth-first search) for maze generation:
― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
|X| | | | | |
― ― ― ― ― ― ― ―
| | | | | | | | | | |
― ― ― ― ― ― ― ― ― ― ― ― ―
| | | | | | | | |
― ― ― ― ― ― ― ― ― ― ―
| | | | | | | | | |
― ― ― ― ― ― ― ― ― ― ―
| | | | | | | | | |
― ― ― ― ― ― ― ― ― ― ― ― ―
| | | | | | | | | | | |
― ― ― ― ― ―
| | | | | | | | | | | |
― ― ― ― ― ― ― ― ―
| | | | | | | | | | | |
― ― ― ― ― ― ― ― ― ―
| | | | | | | | | | |
― ― ― ― ― ― ― ― ― ―
| | | | | #|
― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ― ―
This project is open source and available under the MIT License.
Geniet van de animatie ❤️