This assignment was due in Moodle on Sunday, February 20 at 11:59PM. Click on the following file names to view the sample solutions: AdventuresOfTheMundane1.py and AdventuresOfTheMundane2.py.

For Assignment 2 you will write a very small text-only adventure game. This game is in the spirit of classics such as the Zork Trilogy which were released in the early 1980s and are still well-loved.

Description

The game puts you in the following hypothetical (and ridiculous) situation:

It important to note that all games require you to suspend disbelief; this game is no different.

Winning the Game

You begin the game at the front door of your house. To open the door, you must perform the following actions:

  1. Go to your backyard (GO SOUTH)
  2. Milk the cow (MILK COW)
  3. Give the cat the milk to distract it (DISTRACT CAT); the parrot will fly to you and tell you the combination
  4. Go to your front door (GO NORTH)
  5. Enter the combination (TRY COMBINATION) correctly

Requirements

Click here to view example output from the sample solution.

Submission in Moodle

You may upload a single file named "AdventuresOfTheMundane<SECTION>.py". Please substitute your tutorial section letter for <SECTION> in the file name (e.g., AdventuresOfTheMundaneA.py).

Bonus

You may earn a bonus mark if you implement an "Easter egg". Change the game to detect a new command and print a witty response. You may declare one new global constant in this case.

Marking Scheme

Category Elements Marks
Correctness No gameplay bugs
No Python errors which cause the program to crash
5
Requirements Use of all global constants
No other global variables defined
No global constants altered
At least four functions defined
Invalid or unknown commands managed gracefully
Command case ignored
Correct handling of LOOK and QUIT
Combination tested correctly
7
Style Appropriate comments
Good function and variable names
Appropriate separation of tasks into different functions
Values passed into functions as parameters where appropriate
Values returned from functions where appropriate
"Readable" code
3
Total 15
Bonus 1