/* Dungeon.h CIS 250 David Klick 2013-03-14 Modified by dklick 2017-02-15 - added Item class - added inventory to Room class Modified by dklick 2018-02-10 - added equality operator overloads - added inequality operator overloads - added code for pseudo-NULL items - NULL_ITEM - NULL_ROOM - NULL_PATH - modified to store objects rather than pointers in the linked list This is the header file for a Dungeon object. It also serves as the header file for Room and Path objects. */ #ifndef __DUNGEON_H__ #define __DUNGEON_H__ #include "LinkedList.h" #include using std::string; class Path { public: string direction; string to; Path(); Path(string dir, string to); bool operator==(const Path& obj) const; bool operator!=(const Path& obj) const; static Path NULL_PATH; }; class Item { public: string name; string description; string location; Item(); Item(string name, string description, string location); bool operator==(const Item& obj) const; bool operator!=(const Item& obj) const; static Item NULL_ITEM; }; class Room { public: bool visited; string id; string name; string description; LinkedList paths; LinkedList items; Room(); Room(string id, string name, string desc); Path& getPath(string dir); bool operator==(const Room& obj) const; bool operator!=(const Room& obj) const; static Room NULL_ROOM; }; class Dungeon { public: LinkedList rooms; string currentRoom; Room& getRoom(string id); }; #endif