51 char **
map_gen_onion(
int xsize,
int ysize,
int option,
int layers);
71 while (maze[*cx][*cy] == 0)
74 while (maze[*cx][*cy+1] == 0)
101 for (i = 0; i < xsize; i++)
102 for (j = 0; j < ysize; j++) {
103 if (maze[i][j] ==
'C') {
113 if (ty < 2 || tx < 2 || tx > xsize-2 || ty > ysize-2)
117 maze[tx][ty-1] =
'#';
118 maze[tx-1][ty] =
'D';
121 while ((tx > 2) && maze[tx-1][ty])
127 while (((ty+1) < ysize) && maze[tx][ty+1])
133 while (((tx+1) < xsize) && maze[tx+1][ty])
143 maze[xsize-2][1] =
'<';
146 maze[xsize-2][1] =
'>';
void find_top_left_corner(char **maze, int *cx, int *cy)
int make_wall(char **maze, int x, int y, int dir)
char ** map_gen_onion(int xsize, int ysize, int option, int layers)
char ** make_square_spiral_layout(int xsize, int ysize)