Question: You are being asked to develop a text - based adventure game. The game starts with the user being allotted 3 lives. The user will

You are being asked to develop a text-based adventure game. The game starts with the user being allotted 3 lives. The user will enter their name at the start of the game, the user is then presented the rules of the game as follows -------------------------------------------------------------------------------- RULES OF THE GAME --------------------------------------------------------------------------------1. The user must find the lost treasure of C++2. The area has 5 cities London, Paris, Istanbul, Islamabad, Beijing 3. Inside each city there are four Buildings. A City Hall, Church, Library and Shopping Center 4 A Building in the City Contains an Item that the adventurer must claim by answering a question the user should get three tries at the question at most. 5. Each city Has two roads Each leading to another Area 6 Depending on which road the user took, they may encounter the bandits trying to take the treasure 7 To defeat the bandits the player must solve a riddle given to them. If the riddle is not solved the player is caught and loses a life 8. One City will contain the lost treasure. The city is assigned randomly at the beginning of the game 9. To claim the treasure the user must find the item from each city 10. The First city Cannot have the treasure 11. You have 7 stops to open before you get caught by the bandits that are also trying to steal the treasure 12. Once your lives get to zero the game ends or if you find the treasure Your game can be set to only have one level, but bonus points will be awarded for setting multiple difficulties. #include #include // Needed to use strings #include // Needed to use random numbers #include using namespace std; There may be additional libraries that you need to include The instructions below are for the Object-oriented programming of the game and must be incorporated into the game code The Cities must be created as a class object. The buildings must be created as a class object The Player must also be a class object The Bandits must also be a class object The roads must be objects as well and a friend class of city. Each city must be a child of the parent city class Each type of building must be a child of the parent building class The functions which interact with a class should be friend functions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!