Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Room::Room(eRoom aRoom)
- {
- myRooms = aRoom;
- }
- void Room::Description() const
- {
- switch (myRooms)
- {
- case eRoom::eEntrance:
- std::cout << "You are standing infront of the ENTRANCE" << std::endl;
- break;
- case eRoom::eMainhall:
- std::cout << "You are standing in MAINHALL" << std::endl;
- break;
- case eRoom::eKitchen:
- std::cout << "You are standing in KITCHEN" << std::endl;
- break;
- case eRoom::eLivingRoom:
- std::cout << "You are standing in LIVING ROOM" << std::endl;
- break;
- case eRoom::eBackyard:
- std::cout << "You are standing in BACKYARD" << std::endl;
- break;
- case eRoom::eCellar:
- std::cout << "You are standing in CELLAR" << std::endl;
- break;
- default:
- std::cout << "ERROR" << std::endl;
- }
- }
- std::string Room::GetName()
- {
- return myName;
- }
- void Room::SetName(std::string aName)
- {
- myName = aName;
- }
- Room::~Room()
- {}
- #include <string>
- enum class eRoom
- {
- eEntrance = 1,
- eMainhall,
- eKitchen,
- eCellar,
- eLivingRoom,
- eBackyard
- };
- class Room
- {
- public:
- Room(eRoom aRoom);
- ~Room();
- void Room::Description() const;
- std::string GetName();
- void SetName(std::string aName);
- private:
- eRoom myRooms;
- std::string myName;
- };
- Room entranceRoom = Room(eRoom::eEntrance);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement