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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
/*
Interface file Paths.h, describes the class that is to be held in an array of the room class to determine which exits are available.
Description: A Room is a place in the virtual world where NPCs, creatures, players, items, stores/shops,
weather, and many other things can exist. The room must be able to move an item to and from itself,
collect garbage if items have been laying around too long, etc..
*/
#include "stdafx.h"
//#include "Paths.h"
class Path;
class Room
{
//*
private:
Path *_thisPath;
std::string name;
// The name of the room
int locationX;
// Holds the location of the x coordinate of the room
int locationY;
// Holds the location of the y coordinate of the room
int locationZ;
// Holds the location of the z coordinate of the room
//Entity entityList[];
// Array of objects holds a list of objects located in this object
Path * pathsList[15];
// Array of objects that holds the paths available for this room; the links to other rooms.
std::string longDescription;
// The rooms description, its visual appearance in words, stored in a string.
std::string shortDescription;
// The rooms description, its visual appearance in words, stored in a string.
//*/
public:
///*
//***** Methods *****
int getXLocation();
// Returns the X location
int getYLocation();
// Returns the Y location
int getZLocation();
// Returns the Z location
void setXLocation(int newXvalue);
// sets the X location
void setYLocation(int newYvalue);
// sets the Y location
void setZLocation(int newZvalue);
// sets the Z location
// void addEntity(Entity entityToAdd);
// Adds the entity to the Rooms’s entityList[] array.
// void removeEntity(Entity entityToRemove);
// Removes an entity from the Room’s entityList[] array
void addPath(Path * pathToAdd);
// Check the database, or the map table, whatever, for the paths, and assign the paths to this room
// adds the path to the pathList[] array
void removePath(Path * pathToRemove);
// Removes a path from the pathList[] array
void setLocations(); //******** MAY NOT NEED *******
// Check the database, or the map table, whatever, for the locations of rooms, and assign the x y z values
void checkPath();
// Call when a user is trying to move, or object is trying to be thrown (cool idea) in a certain direction:
// check if there is a path in this direction and if it is navigable
void setName(std::string);
// sets this room's name
std::string getName();
// returns this room's name
void setDescription(std::string longDescriptionToSet, std::string shortDescriptionToSet);
// Set description of the long and short descriptions
void setLongDescription(std::string longDescriptionToSet);
// Set description of the long and short descriptions
void setShortDescription(std::string shortDescriptionToSet);
// Set description of the long and short descriptions
std::string getLongDescription();
// Set description of the long and short descriptions
std::string getShortDescription();
// Set description of the long and short descriptions
///*
Room::Room();
//Default Constructor
Room::~Room();
//Default destructor
//*/
};
|