To the faculty page of James Tam Return to the course web page

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

Only new concepts that need to be applied in the assignment are listed, concepts previously applied in other assignments may need to used in the implementation of your solution.

Assignment difficulty

Students may find assignments more challenging than they first thought. It's best to start work as early as possible. Tips in the very first lecture were provided but here's two reminders: 1) work through the lecture and tutorial material before looking in detail at the assignments 2) start work as soon as possible. If you find you cannot complete an assignment before the due date then you will not be granted an extension.

Note: it is not sufficient to just implement a working program and expect full credit. This is so you implement your solution in the correct way using good design principles and you apply the necessary concepts. Even if your program is fully working and the program is not designed or implemented as specified in the assignment description (e.g. poor variable names used, named constants, functions not implemented appropriately or insufficiently etc.) then you will not be awarded full credit.

Your program must be decomposed properly into 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 [principles of good design for using functions].

Critical design requirements

All instructions must be enclosed within the body of a function, at least 4 functions must be properly defined. No global variables  may be employed. The exceptions could include: import statements (not really needed for this assignment), the creation of global constants (e.g. ATTIC = 1), a global debugging flag and the call to the initial start or main function.

Contrary to some student rumors it is not the case that penalties exist in order to "curve the grades down" or to only allow a certain number of students to pass the course. Besides learning the mechanics of defining and calling functions you need to use them properly. For instances you shouldn't complete a course that teaches you how to write short stories and pen tales that are grammatically correct and may even use metaphorical references and include multiple characters if they include hackneyed metaphors and shallow character development. Because the penalties are quite strict then typically most/all (hopefully the latter) students will implement their solutions in the correct fashion.

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

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 and display the menu and description for the room as long as the player remains in that location.

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 a link to this [folder].

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

Non-functional assignment requirements (style and documentation).

Reminder of critical style requirements

Don't forget that [critical design requirements] (proper use of functions, no global variables) must also be followed.

Marking and grading

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). If don't check and there were problems with the submission then you should not expect that you can "learn your lesson" and simply resubmit.

D2L configuration for this course

Late submissions for full assignments when there is no extension granted: Make sure you give yourself enough time to complete the submission process so you don't get cut off by D2L's deadline (or your submission will be automatically flagged as late by D2L and it will be graded appropriately)..

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 credit (not accepted)

Collaboration:

Assignments must reflect individual work; group work is not allowed in this class nor can you copy the work of others. Some "do nots" for your solution: don't publically post it, don't email it out, don't show it to other students.  For more detailed information as to what constitutes academic misconduct (i.e., cheating) for this course please read the following [link].

Use of pre-created Python libraries:

Unless otherwise told you are to write the code yourself and not use any pre-created functions (or methods). For most assignments 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 functions/methods that you are allowed to use and still get credit in an assignment submission. If it's not listed then you should assume that you won't be able use the function and still be awarded credit. Note: This is a prohibition on using functions that someone else has wrote. You can (actually must) define your own functions for this assignment.