-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
40 lines (38 loc) · 1.01 KB
/
main.cpp
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
#pragma once
#include <graphics.h>
#include <iostream>
#include "setup.h"
using namespace std;
int main()
{
while (true)
{
initial(); //设置界面,按钮,字体等
if (welcome()==BOTTUN_DOWN) //在欢迎界面退出程序
{
closegraph();
return 0;
}
else
{
if (chooseMode()==BOTTUN_DOWN) //选择系统内置地图
{
MAZE mazeA, mazeB, mazeC;
drawMazeBySystem(mazeA, mazeB, mazeC); //绘制默认地图
Stack stack;
switch (chooseMaze()) {
case MAP_A: stack.findWay(mazeA); break;
case MAP_B: stack.findWay(mazeB); break;
case MAP_C: stack.findWay(mazeC); break;
}
}
else //选择自己画地图
{
MAZE mazeDraw;
Stack stack;
mazeDraw.drawMazeByPlayer();
stack.findWay(mazeDraw);
}
}
}
}