cmosss / mazegen

Maze generation in C for a uni project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mazegen

Maze generation in C for a uni project -- Was used for maze game in Embedded Systems module.

Implements a recursive backtracking maze generation algorithm.

Generates mazes like this:

#############################################
#.....#...............#.#.#.........#.......#
#.#.#####.#.#.#.#.###.#.#.#.###.#.###.###.###
#.#.....#.#.#.#.#.#...........#.#...#.#.#...#
###.#.#####.#########.#####.#####.#####.#.###
#.#.#.....#.#.#.#.#...#.#.#.#.#.....#.......#
#.###.#.#####.#.#.###.#.#.###.###.#####.###.#
#...#.#.....#.......#.......#.......#.#...#.#
###.###.#.###.###.###.###.#######.###.#.###.#
#.#...#.#...#...#...#.#...#.#.#.#.........#.#
#.#.#####.###.###.###.###.#.#.#.###.#######.#
#...#.......#...#...#.#...........#.#.#.#.#.#
#.#####.#.###.###.#########.###.#####.#.#.###
#.#.#...#.#.#...#...#.#.#...#.....#.......#.#
#.#.###.###.#.###.###.#.#######.#####.###.#.#
#...#...........#.........#.#...#.....#.....#
###.###.#.#.#.###.#.#.#.###.###.###.#.#####.#
#.#.#.#.#.#.#.#.#.#.#.#.......#.#...#...#.#.#
#.#.#.#########.#######.#.#.###.###.#####.#.#
#.....#.#.............#.#.#...#.......#.....#
#.#####.###.###.###.#.#####.#######.#####.###
#.#.#.......#.....#.#...#.......#.....#.#...#
#.#.###.#.#####.#####.#.###.#.#####.###.#.###
#.......#.#.#.#...#.#.#...#.#...#...#.#.....#
#.#########.#.#.###.###.#####.#######.#.###.#
#.#.#.#.#.........#.#...#.......#.#.#.....#.#
###.#.#.###.###.###.###.###.#.###.#.#.#####.#
#.#.......#.#.#.#.......#...#.#.#.......#...#
#.#.###.###.#.#####.#######.###.#.#########.#
#.....#...#...#.#...#.#.......#...#.#.#.....#
#.#####.#####.#.#####.###.#.#####.#.#.###.#.#
#.#.#.......#.....#.......#.#.#.........#.#.#
#.#.#####.#####.#####.#.#.###.###.###.###.###
#...#.#.#.....#.#.....#.#.#.......#.#...#...#
###.#.#.###.###.###.#.#######.#.###.#.#######
#.........#...#.#...#.#...#...#.#.....#.#.#.#
###.###.###.###.###.#####.###.#####.###.#.#.#
#...#...#.#.....#.......#.......#...#.......#
###.###.#.###.#####.#.#####.#.#.###.###.###.#
#...#.......#.....#.#...#.#.#.#.#.......#...#
#.#.#####.###########.###.#################.#
#.#.#.#...#.#.#.#...........#.#.#.#.#.#.#.#.#
#.###.###.#.#.#.###.#.#.#.###.#.#.#.#.#.#.#.#
#.....#.............#.#.#...................#
#############################################

Implementation based on this article with stack implementation from this article.

About

Maze generation in C for a uni project.

License:MIT License


Languages

Language:C 96.0%Language:CMake 4.0%