Description
Problem Statement
Write a text based C++ adventure game. This game will take input on the range (1,2) to make a choice for each step. The program must use at least 5 if statements, with at least 1 nested if. The game must include a ‘random’ element of chance, changing the progression of the game somehow, and must properly display errors and re-prompt the user if valid input is not entered. The progression of this program for each question will go as follows:
- Use a while loop to keep the program running and to allow the user to restart.
- Start with a welcome message, at the first location
- For each location:
- An option might be given, or the opportunity to experience a random event.
- A function will be called to check user input
- The random chance or user input will be evaluated to produce the desired result
- The next location will start.
- The game will ask the user if they want to restart at the end of the game.