-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoom.cpp
More file actions
57 lines (56 loc) · 1.05 KB
/
Copy pathRoom.cpp
File metadata and controls
57 lines (56 loc) · 1.05 KB
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
#include "Room.h"
Room::Room(){}
Room::Room(bool isExit,int index,vector<Object*> objects){
this -> isExit = isExit;
this -> index = index;
this -> objects = objects;
upRoom = NULL;
downRoom = NULL;
leftRoom = NULL;
rightRoom = NULL;
}
bool Room::popObject(Object* defeat){
objects.erase(objects.begin());
}
void Room::setUpRoom(Room* add){
upRoom = add;
}
void Room::setDownRoom(Room* add){
downRoom = add;
}
void Room::setLeftRoom(Room* add){
leftRoom = add;
}
void Room::setRightRoom(Room* add){
rightRoom = add;
}
void Room::setIsExit(bool add){
isExit = add;
}
void Room::setIndex(int add){
index = add;
}
void Room::setObjects(vector<Object*> add){
objects = add;
}
bool Room::getIsExit(){
return isExit;
}
int Room::getIndex(){
return index;
}
vector<Object*> Room::getObjects(){
return objects;
}
Room* Room::getUpRoom(){
return upRoom;
}
Room* Room::getDownRoom(){
return downRoom;
}
Room* Room::getLeftRoom(){
return leftRoom;
}
Room* Room::getRightRoom(){
return rightRoom;
}