-
Notifications
You must be signed in to change notification settings - Fork 0
/
Maze_Utility.h
35 lines (33 loc) · 1.16 KB
/
Maze_Utility.h
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
//---------------------------------------------------------------------------
#ifndef Maze_UtilityH
#define Maze_UtilityH
#include<stdlib.h>
class Maze
{
private:
int length,width;
int step,steped,steping;
long space;
char** pointer;//-1:出口
//0:路
//1:牆壁
//2:邊界
//3:人
//4:路徑
//5:腳印
void Lineing(int x,int y,int pro2,int step);
public:
Maze(void);
Maze(int,int);
~Maze(void);
void CreateMaze(int,int);
long ReCreate(int,int);
void ReSize(int,int);
void PrintMaze(TForm *,int x1=-1,int y1=-1,int x2=-1,int y2=-1);
int PeopleIn(int x,int y);
void PeopleOut(void);
char PeopleMove(int x1,int y1,int x2,int y2);
int GetStep(char i);
};
//---------------------------------------------------------------------------
#endif