https://github.com/nielsouvrard/dante
C project that includes a maze generator and solver.
https://github.com/nielsouvrard/dante
Last synced: 3 months ago
JSON representation
C project that includes a maze generator and solver.
- Host: GitHub
- URL: https://github.com/nielsouvrard/dante
- Owner: NielsOuvrard
- Created: 2023-10-21T19:00:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-26T12:07:53.000Z (over 1 year ago)
- Last Synced: 2025-01-08T12:14:28.186Z (4 months ago)
- Language: C
- Homepage:
- Size: 24.2 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dante Project
This project is a C project that includes a maze generator and solver. The generator was created by [NielsOuvrard](https://github.com/NielsOuvrard) and the solver was created by [AdamLBS](https://github.com/AdamLBS).
## Maze Generator
The maze generator creates a random maze using Recursive Backtracking algorithm.
The maze can be generated with different sizes and complexities.## Maze Solver
The maze solver uses the A* algorithm to find the shortest path from the starting point to the end point in the maze.
## Usage
To use the maze generator and solver, follow these steps:
1. Clone the repository: `git clone https://github.com/NielsOuvrard/dante.git`
2. Navigate to the project directory: `cd dante`
3. Compile the generator and solver: `make`
4. Generate a maze: `./generator/generator [width] [height] [perfect] > [maze_file]`
5. Solve the maze: `./solver/solver [maze_file]`## Example
To generate a maze with a width of 10 and a height of 5 and solve it, run the following commands:
```bash
./generator/generator 10 5 > maze1.txt
./solver/solver maze1.txt
```
To generate a perfect maze with a width of 12 and a height of 20 and solve it, run the following commands:
```bash
./generator/generator 12 20 perfect > maze2.txt
./solver/solver maze2.txt
```## File example
The maze file is a text file that contains the maze. The maze is represented by a grid of characters. The characters are either `*` or `X`. The `*` character represents an empty space and the `X` character represents a wall.
The starting point is at the top left corner of the maze and the end point is at the bottom right corner of the maze.```
**X***XX**
**X*XXX***
X*X*****X*
**XX***XX*
*XXXX*XX**
******X***
XX*XX**X**
******X***
***X*XXXX*
**********
```## Credits
- [NielsOuvrard](https://github.com/NielsOuvrard)
- [Adam Elaoumari](https://github.com/AdamLBS)