-
Notifications
You must be signed in to change notification settings - Fork 0
/
cell.cc
69 lines (54 loc) · 841 Bytes
/
cell.cc
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
64
65
66
67
68
69
#include "cell.h"
void cell::setpos(int r, int c){
row = r;
col = c;
}
char cell::gettype() const{
return type;
}
int cell::isoccupied() const{
return occupied;
}
char cell::getchartype() const{
return chartype;
}
int cell::getroom() const{
return curroom;
}
info* cell::getinfo() const{
return curinfo;
}
bool cell::getmove() const{
return move;
}
void cell::setchartype(char c, info* newinfo, int type){
occupied = type;
chartype = c;
curinfo = newinfo;
//index = i;
}
void cell::setstair(){
occupied = 9;
chartype = '\\';
}
void cell::settype(char c){
type = c;
}
void cell::setroom(int n){
curroom = n;
}
void cell::movechar(){
curinfo = nullptr;
chartype = 0;
occupied = 0;
move = 0;
}
void cell::changemove(){
move = !move;
}
void cell::resetmove(){
move = 0;
}
cell::~cell(){
//delete curinfo;
}