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
|
#include <iostream>
#include <string>
#include <vector>
#include <cctype>
using namespace std;
enum en_DIRS {NORTH, EAST, SOUTH, WEST};
enum en_ROOMS {KITCHEN, DARKROOM, CARPARK, LOBBY, RESTAURANT, CORRIDOR, STOREROOM, POOL, GARDEN, COURTYARD,
MASTERCHAMBER};
enum en_VERBS {GET, DROP, USE, OPEN, CLOSE, EXAMINE, INVENTORY, LOOK};
enum en_NOUNS {STORE_DOOR, MAGNET, METER, ROULETTE, MONEY, FISHROD};
const int NONE = -1;
const int DIRS = 4;
const int ROOMS = 11;
const int VERBS = 8;
const int NOUNS = 6;
class Words
{
public:
string word;
int code;
};
class Room
{
public:
string description;
int exits_to_room[DIRS];
};
class Noun
{
public:
string word;
string description;
int code;
int location;
bool can_carry;
};
void set_rooms(Room *rms);
void set_directions(Words *dir);
void set_verbs(Words *vbs);
void set_nouns(Noun *nns);
|