CS120
Programming Assignment #3A
Due Sunday, February 11th, at Midnight.
For this assignment you will be modifying the Adventure Game we have been
working on in class. The
code is also posted on the course scehdule.
Make the following changes:
- Pick a new theme and environment for the game, e.g. a Haunted Mansion,
fairy forest, futuristic city, high school building, etc.
Each "room" will be an area in the new
game.
- Have the game begin by printing a message to set the theme of the game.
- Define two global variables (one can replace the gold in the original
game) that change as the player moves around.
- Create a total of at least six rooms. Each of the two global vairables
should change in at least three of the rooms. I.e. the player's "gold"
should change in at least three rooms.
- When the player exits they should get a good-bye message that refers
to at least one of the two variables. For example, "You escaped the dungeon
with X gold.".
- Extra Credit: Create at least one room with an "extra" interaction.
For example, the player has to correctly answer a math question to win
some gold.
As always include a block of comments at the beginning of the programs
(or add to the existing block) that lists your name, date,
and the assignment number. Also include comments on any parts of the
assignment you didn't finish or on any extra work you did.
Include this comment block at the beginning
of every assignment and lab.
Turn in: Print the program and sample output (generated using the
script command) showing that
the program works.
Turn in both
the program and the output.