Laby is a maze generator written in c++. It uses a recursive approach to randomly build a tree on a rows
xcols
grid, where rows
and cols
are both input parameters.
$ ./laby
Enter number of rows: 10
Enter number of columns: 20
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | | | |
+ +---+---+---+ +---+---+ +---+ +---+ +---+ +---+---+ +---+---+ +
| | | | | | | | | | |
+ + +---+ +---+ +---+---+ +---+ +---+ +---+ + +---+ +---+ +
| | | | | | | | | |
+---+---+ +---+ +---+---+ +---+---+---+ +---+---+---+---+ + +---+---+
| | | | | | | | |
+ +---+ + +---+---+ +---+---+ +---+---+ +---+ + +---+---+---+ +
| | | | | | | | |
+ +---+---+---+---+ +---+---+ + + +---+---+---+ +---+---+ + +---+
| | | | | | | | | |
+ + +---+---+ +---+---+---+---+ +---+ +---+ + + + + + + +
| | | | | | | | | | | |
+ +---+---+---+ +---+---+---+ +---+ +---+ +---+---+ +---+---+ + +
| | | | | | | | | |
+---+---+---+ +---+ + + + + +---+ +---+---+ +---+---+ + + +
| | | | | | | | | | | | | |
+ +---+---+ + +---+ + + + + +---+ + +---+---+ + +---+ +
| | | | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+