-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoom.cpp
61 lines (58 loc) · 1.33 KB
/
Room.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
#include "Room.h"
Room::Room(){}
Room::Room(bool isExit, int index, vector<Object*> object){
this->isExit = isExit;
this->index = index;
for(int i=0;i<object.size();i++){
this->objects.push_back(object[i]);
}
}
//vector<Object*> objects
//Object* object
void Room::popObject(vector<Object*> objects){
objects.erase(objects.begin());
}
void Room::setUpRoom(Room* upRoom){
this->upRoom = upRoom;
}
void Room::setDownRoom(Room* downRoom){
this->downRoom = downRoom;
}
void Room::setLeftRoom(Room* leftRoom){
this->leftRoom = leftRoom;
}
void Room::setRightRoom(Room* rightRoom){
this->rightRoom = rightRoom;
}
void Room::setIsExit(bool isExit){
this->isExit = isExit;
}
void Room::setIndex(int index){
this->index = index;
}
void Room::setObjects(vector<Object*> objects){
for(int i=0;i<objects.size();i++){
this->objects.push_back(objects[i]);
}
}
bool Room::getIsExit(){
return this->isExit;
}
int Room::getIndex(){
return this->index;
}
vector<Object*> Room::getObjects(){
return this->objects;
}
Room* Room::getUpRoom(){
return this->upRoom;
}
Room* Room::getDownRoom(){
return this->downRoom;
}
Room* Room::getLeftRoom(){
return this->leftRoom;
}
Room* Room::getRightRoom(){
return this->rightRoom;
}