Skip to content

My personal project is a maze generation algorithm implemented in C. This program will generate mazes of various sizes and complexities depending on the user input.

Notifications You must be signed in to change notification settings

GameboyColor32/mazes_and_pathfinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Maze Generator in C

This is a simple command-line program written in C that generates random mazes in ASCII art format. You can specify the width and height of the maze as command-line arguments. The program uses a generic queue implemented with void pointers.

Compilation

To compile the program, make sure you have gcc (GNU Compiler Collection) and make installed on your system. Then, run the following command in the project directory:

make

This will compile the source code and generate an executable file named dante.

Usage

To generate a random maze, use the following command-line syntax:

./dante <width> <height>

Replace and with the desired dimensions of the maze. For example, to create a 10x10 maze, you can run:

./dante 10 10

The program will generate a random maze of the specified size and print it to the command line.

Generic Queue Implementation

The program includes a generic queue implementation using void pointers. This queue data structure is used internally to facilitate maze generation. The queue is designed to work with any data type, making it flexible and reusable. While this is not the best thing to do in C, it was a nice exercice to try out.

About

My personal project is a maze generation algorithm implemented in C. This program will generate mazes of various sizes and complexities depending on the user input.

Resources

Stars

Watchers

Forks