CS 115 Project 3, Spring 2017:
Ghost Word Game

[Back to CS 115 schedule]


Summary: In this project, you will make a simple game using the graphics package. Ghost Word is a guessing game modeled after Hangman. One player (or the computer) thinks of a word, and the other player tries to fill in the letters of the word. The game is over when the word is entirely guessed, or when the guessing player reaches 6 incorrect guesses. The player's current number of incorrect guesses is illustrated by drawing a figure that slowly disappears with every incorrect guess; when the figure has entirely disappeared, the guessing player loses.

In this project, you are designing your own functions and expressing them. In contrast to prior assignments, a large part of this assignment is focused on organization, design and coding style. Make simplicity, clarity, efficiency and good style the top goals in your design (see the grading rubric for details). The user interface does not need to match the sample output; instead, feel free to be creative and design your own game with its own "look and feel". The user interface should, however, match the specifications in the assignment and be professional, unoffensive, and enjoyable by everyone.

Due dates:

Useful terminology for our program:

See the below video to see an example of the game being played.


Getting Started

Download the following files into your PyCharm directory for Project 03:

The file wordlist_long.txt is the official Scrabble dictionary minus some offensive words. You should use it for testing, but your testing should not be limited to using this file. The idea is that the player will create their own wordlist.txt file to stump their friends, and so your program will need to handle other people's wordlists (which might contain invalid words). Read the specification for how your program should react. The file wordlist_short.txt is a selection of harder words from Wolfram's blog, modified to demonstrate some invalid entries that your program will need to handle.

You should write your code in a separate file. To use the support library for this project, add the following line to your file:

from ghost_support import *
This will allow you to refer to the WINSIZE variable and to call our choose_word() function. Do not modify ghost_support.py except for testing purposes.


Checkpoint A (5 points)

For Checkpoint A, you will need to demonstrate a program that prompts the user for the name of their dictionary file and outputs summary statistics of this dictionary (see below). Then, prompt the user to if they want to play a game of Ghost Word.

To process the dictionary:

To print the dictionary statistics:

To prompt the user to play a game:

Hints:


Checkpoint B (5 points)

Your Checkpoint B code demonstates a playable game without any graphics, featuring the below behavior. (Note: without any graphics, this game is indistinguishable from the more familiar game Hangman.)

In every game of Ghost Word, your program should do the following:


Final Code

In your final code, you will extend your Checkpoint B code in two ways:

Example stick-figure

There is no demo for your final code. See the end of this specification for submission instructions, including a grading rubric.


Grading

Correctness [55%]

The most important part of your grade is the correctness of your final program. Your program will be tested numerous times, using different inputs, to be sure that it meets the specification. A detailed grading sheet for this project is posted here.

Programming Design and Style [35%]

In addition to being correct, your program should be easy to understand and well documented. For details, see the grading sheet above.

Checkpoints [10%]

Your checkpoints are each worth 5 points, as described above. The checkpoints cannot be submitted late.

Extra credit [up to 5%]

There are lots of possibilities to extend this project for extra credit. If you have an idea you'd like to implement, then (at least a day before final code submission) you need to propose it in a private note sent to 'Instructors' on Piazza and get approval for your feature. You are responsible for making sure it is possible to satisfy the whole project grading rubric while also encorporating your extra credit.

If you don't get your extra credit feature approved, you won't get credit for it (I am likely to think you just implemented your code strangely, or mis-read the assignment). If you discuss it with me in person, it is not enough --- it must be in writing.


Submitting your final code

You should submit your final code on Moodle by the deadline. As a backup, I strongly encourage you to upload a copy to your blue directory in case something goes wrong with your submission to Moodle.

Please name your file yourlastnameP3.py, substituting your actual last name (in lowercase) as indicated.

You should submit only yourlastnameP3.py to Moodle. (The only exception to this is if you have implemented extra credit that requires other files, in which case you should submit all these files as a single ZIP file.)


Collaboration policy

Programming projects must be your own work, and academic misconduct is taken very seriously. You may discuss ideas and approaches with other students and the course staff, but you should work out all details and write up all solutions on your own. The following actions will be penalized as academic dishonesty:

Late policy

There is a 48-hour grace period associated with the final project deadline. This grace period is designed to only cover small personal emergencies and other unexpected events. No other consideration will be given for these small emergencies.