forked from jogp10/GongasMaze
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPost.cpp
63 lines (55 loc) · 858 Bytes
/
Post.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//T02_G11
#include "Post.h"
/**
* Post -> get info from post's location
* @param row
* @param col
* @param type
*/
Post::Post(unsigned int row, unsigned int col, char type){
this->row = row;
this->col = col;
this->type = type;
if(type == '*') electric = true;
}
/**
* setSymbol -> electric or not
* @param type
*/
void Post::setSymbol(char type)
{
this->type = type;
if(type == '*') electric = true;
}
/**
* getRow -> get post's row
* @return
*/
unsigned int Post::getRow() const
{
return row;
}
/**
* getCol -> get post's col
* @return
*/
unsigned int Post::getCol() const
{
return col;
}
/**
* getSymbol -> get post's symbol
* @return
*/
char Post::getSymbol() const
{
return type;
}
/**
* getLive -> get post's state
* @return
*/
bool Post::getElectric() const
{
return electric;
}