CPSC 217: Assignment 3  ("The Dungeon of Doom": the Inner Sanctum)

Due at 4 PM. For assignment due dates see the main schedule on the course webpage. The program must be written and run under python version 3.X.

New Concepts to be applied for the assignment

Functional requirements (for the marks allocated for each feature see the marking spreadsheet)

This program begins in inner sanctum of the house (the living room). The player has solved the puzzle for first part of the game and passed through the door in the entryway with the inner door to the rest of the house vanishing behind the player (i.e. the previous part of the house is not accessible in this program so the Assignment 2 code is not needed for this assignment).

You must implement your program using functions. One way of decomposing your program is to implement the processing of instructions for a room as a single function or multiple functions. Because there are three rooms that will mean that your program will consist of at least 4 functions (1 per room plus a starting function). You may be able to subdivide your program using an alternate approach to writing 1 function per room but your program must follow good design principles for using functions.

All instructions must be enclosed within the body of a function. The exceptions could include: import statements (not really needed for this assignment), the creation of global constants (or a global debugging flag) and the call to the initial start or main function. You will be penalized heavily if functions are not used or improperly used.


Living room contents: a pot of soil, stairs going up, a dark entranceway, a ball of a string

Attic contents: a tiny hole in the floor, an unlimited supply of cheese, stairs going down.

Bedroom contents: a tomcat which is intently watching a mouse hole (default), mouse (after the cat leaves).

As was the case with the previous assignment each room will provide a description of the contents, display a menu of options (which varies depending upon the actions of the player), get and error check the player's selection as long as the player remains in the room.

Game walkthrough: because this program is more complex than the previous one the summary map cannot provide details of what the player needs to do in order to win the game. Instead this step-by-step walkthrough specifies what's needed:

  1. Living room: Pick up the ball of string.
  2. Living room: go up the stairs to the attic.
  3. Attic: drop the string down the hole.
  4. Attic: pick up some cheese.
  5. Attic: go down the stairs back to the living room.
  6. Living room: go through the dark entranceway to the bedroom.
  7. Bedroom: Feed the cheese to the mouse.
  8. Bedroom: go through the dark entranceway back to the living room.
  9. Living room: view the pot of soil (and win the game).

Sample outputs of this program:

You can find sample outputs of my solution to this assignment in D2L under: Content->Links to assignments->Assignment 3 sample outputs

In addition to grading on whether the above functionality was correctly implemented TAs will also look at documentation and style.

Documentation requirements

Style requirements

As mentioned your program should consist of at least 4 functions including the starting function.

Because the new learning concepts to be applied are related to functions and tools/topics related functions your grade will be severely impacted if you bypass the use of these concepts in this assignment and all other subsequent assignments (or projects if required during the semester)..

Submitting your work:

Marking

Points to keep in mind:

  1. Due time: All assignments are due at 4 PM on the due dates listed on the course web page.  Late assignments or components of assignments will not be accepted for marking without approval for an extension beforehand. Alternate submission mechanisms (non exhaustive list of examples: email, uploads to cloud-based systems such as Google drive, time-stamps, TA memories) cannot be used as alternatives if you have forgotten to submit work or otherwise have not properly submitted into D2L. Only files submitted into D2L by the due date is what will be marked, everything else will be awarded no credit.
  2. Method of submission: You are to submit your assignment using D2L [help link]. Make sure that you [check the contents of your submitted files] (e.g., is the file okay or was it corrupted, is it the correct version etc.). It's your responsibility to do this! (Make sure that you submit your assignment with enough time before it comes due for you to do a check).
  3. Identifying information: All assignments should include contact information (full name, student ID number and tutorial section) at the very top of your program in the class where the 'main()' method resides (starting execution point). (Note other documentation is also required for most assignments).
  4. Collaboration: Assignments must reflect individual work; group work is not allowed in this class nor can you copy the work of others.  For more detailed information as to what constitutes academic misconduct (i.e., cheating) for this course please read the following [link].
  5. Execution: programs must run on the computer science network (if applicable during that particular semester) running Python 3.x. If you write you code in the lab and work remotely using a remote login program such as Putty or SSH then you should be okay (assuming you don't login to a non-Linux computer). If you choose to install Python on your own computer then it is your responsibility to ensure that your program will run properly here. If it won't run using Python 3.x then it won't be awarded credit. It's up to you if you wish use the graphical program builder IDLE to write/run your programs but if you do you submit your program in the form of text ".py" file or files.
  6. Use of pre-created Python libraries: unless otherwise told you are to write the code yourself and not use any pre-created functions. For this assignment the usual acceptable functions include: print(), input() and the 'conversion' functions such as int(), float(), str(). Look at the particular assignment description for a list of other classes that you are allowed to use and still get credit in an assignment submission.
  7. Extensions may be granted for reasonable cases by the course instructor with the receipt of the appropriate documentation (e.g., a sworn declaration with a commissioner of oaths). Typical examples of reasonable cases for an extension include: illness or a death in the family. Example cases where extensions will not be granted include situations that are typical of student life: having multiple due dates, work commitments etc. Tutorial instructors (TAs) will not be able to provide extension on their own and must receive permission from the course instructor first.
  8. Questions about marking: Your Teaching Assistants will be marking the assignments so I will first direct your questions to them regarding the marking

  9. Late submissions (no extension granted):

    Submission received:

    On time

    Hours late : >0 and <=24

    Hours late: >24 and <=48

    Hours late: >48 and <=72

    Hours late: >72 and <=96

    Hours late: >96

    Penalty:

    None

    -1 GPA

    -2 GPA

    -3 GPA

    -4 GPA

    No