-
Notifications
You must be signed in to change notification settings - Fork 0
/
Room.h
77 lines (59 loc) · 1.64 KB
/
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
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
70
71
72
73
74
75
76
77
/**************************************************
Project: The Tamer, the Arigamo and the Fuhai Gem
Task: Assignment 2 + 3
Author: Sean Lee
Purpose: Room Class Header File
The Header file for the Room class which contains
the attributes and behaviours of the locations
in the Abandoned Ruins.
**************************************************/
#ifndef ROOM_H
#define ROOM_H
#include <string>
#include <sstream>
#include <vector>
#include "CommonFuncs.h"
#include "GameEnums.h"
using namespace std;
class Room {
private:
int roomNumber;
string roomName;
string roomDescription;
vector<string> roomExitDirections;
vector<int> roomExitConnections;
bool hasPlayer;
vector<int> hazards;
public:
// constructors and destructors
Room();
Room(int num, string name, string description, vector<string> exitDir, vector<int> exitConnections);
~Room();
// accessor methods
int getNumber();
string getName();
string getDescription();
vector<string> getExitDirections();
string getExitDirectionsAsString();
vector<int> getExitConnections();
string getExitConnectionsAsString();
int getRoomConnection(string direction);
bool isPlayerInRoom();
vector<int> getHazards();
string getHazardsAsString();
bool hasHazard();
string getRoomInfo();
string getRoomExits();
string getDetails();
// mutator methods
void setNumber(int num);
void setName(string name);
void setDescription(string description);
void setExitDirections(vector<string> directions);
void setExitConnections(vector<int> connections);
void setPlayerInRoom(bool isInRoom);
void setHazards(vector<int> hazards);
void addHazard(int hazard);
void removeHazard(int hazard);
};
#endif