最初级版密宫
1 #include <stdio.h>
2 #include<stdlib.h>
3 #define ROW 6
4 #define LOW 6
5 typedef struct point
6 {
7 int row;
8 int low;
9 }point;
10
11 typedef struct Maze
12 {
13 int map[ROW][LOW];
14 }Maze;
15
16 void mazeinit(Maze *maze)
17 {
18 int map[ROW][LOW]={
19 {0,1,0,0,0,0},
20 {0,1,1,1,0,0},
21 {0,1,0,1,0,0},
22 {0,1,0,1,1,0},
23 {0,1,0,0,0,0},
24 {0,1,0,0,0,0},
25 };
26 int i,j;
27