forked from dh00023/C-MazeSearchProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
51 lines (39 loc) · 853 Bytes
/
main.c
File metadata and controls
51 lines (39 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "makeMaze.h"
int main() {
int maze[10][10] = {
{ 1,1,1,1,1,1,1,1,1,0 },
{ 1,0,0,1,0,0,1,0,0,0 },
{ 1,1,0,1,0,1,1,1,1,0 },
{ 1,0,1,0,1,0,0,1,1,1 },
{ 1,1,1,0,1,0,1,1,0,1 },
{ 1,0,1,0,1,1,1,1,0,1 },
{ 1,0,0,0,1,0,1,1,0,0 },
{ 1,0,1,1,1,0,0,0,1,0 },
{ 1,1,1,0,1,1,1,0,1,0 },
{ 1,0,0,0,1,0,1,1,1,1 } };
int num;
while (1) {
printf("1. DFS \n");
printf("2. Dijikstra \n");
printf("¹øÈ£ : ");
scanf_s("%d", &num, sizeof(int));
if (num == 1) {
Stack*s;
int**route;
init1(&s);
//printMaze(maze, size);
route = routeInit();
//1ÀÌ Åë·Î 0 º®
search(maze, route, s);
printSearch(maze, s);
}
else if (num == 2) {
init();
dijikstra(maze, 0);
mazeSearch(maze);
}
system("cls");
if (num == 99)break;
}
system("pause>>null");
}