-
Notifications
You must be signed in to change notification settings - Fork 0
/
room.h
71 lines (52 loc) · 1.57 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
/*This will be the Room class*/
//preprocessor
#ifndef ROOM_H
#define ROOM_H
#include <iostream>
#include <string>
#include <vector>
#include "item.h"
using namespace std;
class Room {
//member data
int xcoord, ycoord;
string name;
string desc;
vector<Item> loot;
public:
//constructors
Room();
Room(int xcoord0, int ycoord0);
Room(int xcoord0, int ycoord0, string name0);
Room(int xcoord0, int ycoord0, string name0, string desc0);
Room(int xcoord0, int ycoord0, string name0, string desc0, Item item);
~Room() {}
//member functions
//returns the x coord of the room
int get_xcoord();
//returns the y coord of the room
int get_ycoord();
//returns the name of the room
string get_name();
//returns the description of the room
string get_desc();
//sets the x coord for the room
void set_xcoord(int xcoord0);
//sets the y coord for the room
void set_ycoord(int ycoord0);
//sets the name for the room
void set_name(string name0);
//sets the description for the room
void set_desc(string desc0);
//lists items in the room
void list_loot();
//returns a pointer to the loot vector
vector<Item>* get_loot();
//returns the amount of items in the room
int get_loot_size();
//adds an item to the loot of the room
void add_item(Item item0);
//removes an item of loot from the room
void remove_item(Item item0);
};
#endif