-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboard.hpp
More file actions
55 lines (49 loc) · 941 Bytes
/
board.hpp
File metadata and controls
55 lines (49 loc) · 941 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
52
53
54
55
/*
* Board.hpp
*
* Created on: 20 wrz 2019
* Author: MJarmolkiewi
*/
#ifndef BOARD_HPP_
#define BOARD_HPP_
#define MAPSIZEX 15u
#define MAPSIZEY 15u
#include "point_of_intrest.hpp"
#include <stack>
#include <list>
class Board
{
public:
//Board
POI m_Start;
POI m_End;
POI m_Boy;
POI m_LastPoint;
char mapArray[MAPSIZEX][MAPSIZEY];
char stepsMade[MAPSIZEX][MAPSIZEY];
int stepsCnt;
std::stack<POI> boy_moves;
int cnt;
std::list<POI> sqr_fields;
bool findSqrs();
void sqr_FindSE();
void sqr_clean(POI c1, POI c4);
void sqr_delete();
void rmoveUp();
void rmoveDown();
void rmoveRight();
void rmoveLeft();
void printFinalPath();
Board(char array[MAPSIZEX][MAPSIZEY]);
bool findStartEnd(bool flag);
void printStepsMade();
bool findPath();
void moveUp();
void moveDown();
void moveRight();
void moveLeft();
void removeDeathEnds();
void cleanMap();
void reverseFindPath();
};
#endif /* BOARD_HPP_ */