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 textbased adventure game. The game starts with the user being allotted 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 The user must find the lost treasure of C The area has cities London, Paris, Istanbul, Islamabad, Beijing Inside each city there are four Buildings. A City Hall, Church, Library and Shopping Center 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. Each city Has two roads Each leading to another Area Depending on which road the user took, they may encounter the bandits trying to take the treasure 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 One City will contain the lost treasure. The city is assigned randomly at the beginning of the game To claim the treasure the user must find the item from each city The First city Cannot have the treasure You have stops to open before you get caught by the bandits that are also trying to steal the treasure 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 Objectoriented 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
