-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtextgame.h
More file actions
65 lines (61 loc) · 1.62 KB
/
textgame.h
File metadata and controls
65 lines (61 loc) · 1.62 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef TEXTGAME_H
#define TEXTGAME_H
#include <string>
#include <vector>
using namespace std;
class Option {
public:
void SetOptionKeyword(string optionKeyword);
void SetStat(string stat);
void SetPassText(string passText);
void SetFailText(string failText);
void SetPexit(int pexit);
void SetFexit(int fexit);
void SetFailDamage(string failDamage);
string GetOptionKeyword();
string GetStat();
string GetPassText();
string GetFailText();
int GetPexit();
int GetFexit();
string GetFailDamage();
Option();
Option(string optionKeyword, string stat, string passText, int pexit, int fexit, string failText, string failDamage);
private:
string optionKeyword;
string stat;
int fexit;
int pexit;
string passText;
string failText;
string failDamage;
};
class Room {
public:
void SetRoomNumber(int roomNumber);
void SetDescription(string description);
int GetRoomNumber();
string GetDescription();
vector<Option> GetOptions();
Option* GetLastOption();
void AddOption(Option option);
Room();
Room(int roomNumber, string description);
private:
int roomNumber;
string description;
vector<Option> optionList;
};
class World {
public:
void SetCurrentRoom(int index);
Room GetCurrentRoom();
Room* GetLastRoom();
void AddRoom(Room room);
void Play();
World();
private:
vector<Room> roomList;
Room currentRoom;
};
#endif