This is a simple Android mobile application developed using Flutter that generates random perfect mazes.
- Clone this repository on your local device.
- Open the cloned repository folder on your preferred IDE (VS Code Recommended).
- Connect & select either a physical/virtual android device on VS Code (Virtual Google Pixel 6 used during development).
- Run application by typing "flutter run" in terminal
- Start using application and exploring its features.
- Clone this repository on local device.
- Open cloned repository folder on VS Code.
- Create a virtual device on Android Studio (Google Pixel 6 with API 35).
- Make sure newly created virtual device is selected on VS Code.
- Open main.dart file.
- VS Code --> Run --> Run Without Debugging or "CTRL + F5" on Windows.
- Start using application.
- Generates random perfect mazes of varying sizes
- Display generation time for each maze
- Interactive slider to select size of maze
The maze generation algorithm chosen for this application is the Recursive Backtracking algorithm. This algorithm creates pefect mazes by visiting cells and backtracking when necessary to ensure every cell has been visted and connected.
- Choose a starting point in maze.
- Randomly choose a wall at that point and carve a passage through to the adjacent cell if the adjacent has not been visited yet. This becomes the new current cell.
- If all adjacent cells have been visited, back up to the last that has uncarved walls and repeat the process.
- The algorithm ends when the process has backed all the way up to the starting point.