Hi,
I have to create a maze in C++.
// Below is the problem Statement
Let's use a simple case of a w=4 (columns) by h=3 (rows) maze to illustrate the maze-generation algorithm.
We will start with 4 × 3 = 12 closed rooms, arranged in a 4 by 3 grid:
+-+-+-+-+
| | | | |
+-+-+-+-+
| | | | |
+-+-+-+-+
| | | | |
+-+-+-+-+
The rows are numbered 1 through h and the columns are numbered 1 through w.
Between adjoining rooms, there is either a removable vertical wall or a removable horizontal wall. There are a total of (w-1) × h removable vertical walls and w × (h-1) removable horizontal walls. Let's number these removable walls in sequencial order from top to bottom and from left to right within a row (i.e., row-major order). Some of the removable wall numbers are depicted below.
+-+-+-+-+
| 0 1 2 |
+3+4+5+6+
| 7 8 9 |
+-+-+-+-+
| | | | |
+-+-+-+-+
//Please Suggest how should I start creating the maze.How do I save the walls in the maze??