-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoom.h
43 lines (38 loc) · 1015 Bytes
/
Room.h
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
#ifndef ROOM_H_INCLUDED
#define ROOM_H_INCLUDED
#include <iostream>
#include <string>
#include <vector>
#include "Object.h"
using namespace std;
class Room
{
private:
Room* upRoom;
Room* downRoom;
Room* leftRoom;
Room* rightRoom;
bool isExit;
int index;
vector<Object*> objects; /*contain 1 or multiple objects, including monster, npc, etc*/
public:
Room();
Room(bool, int, vector<Object*>);
void popObject(vector<Object*>); /*pop out the specific object, used when the interaction is done*/
/* Set & Get function*/
void setUpRoom(Room*);
void setDownRoom(Room*);
void setLeftRoom(Room*);
void setRightRoom(Room*);
void setIsExit(bool);
void setIndex(int);
void setObjects(vector<Object*>);
bool getIsExit();
int getIndex();
vector<Object*> getObjects();
Room* getUpRoom();
Room* getDownRoom();
Room* getLeftRoom();
Room* getRightRoom();
};
#endif // ROOM_H_INCLUDED