Assignment 5: If statements
In this assignment you will create a short text-based adventure game. The user is presented with a short text description of the state of the game and a small set of alternative actions to take. Based on the user’s response your program will present a different game state. This continues until the game ends; there may be several possible endings with different degrees of success. The text of the game state and the alternatives are provided in a table below. In each case where an input is given by the user, “other” denotes any number other than those explicitly listed in that action.
- The results of the user’s actions should be clear; make sure you use whitespace to separate the list of alternative actions from the description of the next game state.
- Each time the user acquires or loses an object, (such as the purse) you must print a message about the object before describing the next game state.
- You need not handle non-numeric data (it’s ok if the program crashes for an input of “a”).
1. You need not handle non-numeric data (it’s ok if the program crashes for an input of “a”).