-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathroom.h
More file actions
48 lines (43 loc) · 1.34 KB
/
room.h
File metadata and controls
48 lines (43 loc) · 1.34 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
#ifndef ROOM_H
#define ROOM_H
#include <string>
#include <map>
#include <set>
#include "item.h"
class Item;
class Room {
private:
std::string requirement;
std::string title;
std::string desc;
std::map<std::string, Room*> exits;
std::set<Item*> floor;
int roomId;
bool startingRoom;
public:
int getID(){return roomId;}
void save();
void setTitle(std::string t){title = t;}
Room(std::string, std::string);
Room(std::string, std::string, std::string);
std::string getRequirement() const;
std::string getTitle() const;
std::string getDesc() const;
void setAdjacent(std::string, Room*);
Room *getAdjacent(std::string);
std::map<std::string, Room*> getExits() const;
void addItemToFloor(Item*);
std::set<Item*> getFloor() const;
std::set<Item*> getItems() const;
void dropItemFromFloor(Item*);
Item* findItemOnFloor(std::string) const;
void listItemsOnFloor() const;
void setReq(std::string);
void setDesc(std::string);
void setreqMove(std::string, std::string, std::string);
void setChance(std::string, double, std::string);
void setStartingRoom(bool);
bool isStartingRoom() const;
bool roomhaveReq();
};
#endif