#include "GuessTheNumberRoom.h" #include "ExitRoom.h" #include #include #include using namespace std; ARoom* go_to_next_room(int randRoomChoice, mt19937& mt) { switch(randRoomChoice) { case 7: return new ExitRoom(); default: return new GuessTheNumberRoom(mt); } } int main() { mt19937 mt( chrono::steady_clock::now().time_since_epoch().count() ); uniform_int_distribution dist(1, 10); ARoom* currentRoom; do { currentRoom = go_to_next_room( dist(mt), mt ); cout << "Welcome to the " << currentRoom->getRoomName() << endl; } while( !currentRoom->escapeTheRoom() ); cout << "You made it out!" << endl; return 0; }