Vous êtes sur la page 1sur 2

Project Proposal - Wheels of Hanging Words Without Man Friends Fortune Phrases Group: Nick Kirkby, Frank Orndorff-Plunkett,

Laura Zhang We propose creating a single player version of Wheel of Fortune (wheel to be added if time allows) Rules A random phrase (proverb or figure of speech like in http://www.phrases.org.uk/meanings/ american-phrases-and-sayings.html) is selected and represented as blank spaces to the user on the interface (whitespace of phrase clearly displayed on GUI) Users guess letters that they think appear in a word that the phrase contains If they guess a correct letter, the corresponding blanks are filled in and points are tallied If the letter they guess is not in the word, points deducted for single player mode and person loses a turn for two-player mode? more obscure letters have higher point values (maybe using a wheel like in wheel of fortune for bonus points). time trial-styled: the game is over when time runs out and bonus points are awarded for various ranges of scores. Should be able to look up a random phrase from a text file of common sayings split phrase into a list of words split each word into a list of letters heeding whitespace using regex interact with the user while they guess letters respond with audio to correct and incorrect guesses detect and reject invalid input regex will make this simple keep score run a timer, adding time whenever a word is completed Approach Select a random word or phrase from a large text file, give the user a number of underscores (representing blanks) corresponding to the length of the word with whitespace left as an unusable blank in the GUI. The user guesses characters. The guesses (string) are checked for presence in the randomly selected word(string). Wrong guesses will subtract points from the players score. Each correct guess will increment the score by a value specific to each character in the alphabet. Those values will be held in a dictionary. {string,pointvalue<int>} When time runs out, the game ends. The user will be given the option to enter their name to be stored in a high score table.

Structure Classes: Main - calls methods from other classes in the correct order and manages program flow

BackEnd - Picks word or phrase randomly from a large text file containing many english words or phrases. A duplicate of that string is then processed, changing all non-space or punctuation characters to underscores. The processed string is sent to the UImanager to be printed to the UI. BackEnd also receives processed input from Interface. For every character (guess) received from Interface, BackEnd will check for its presence in the mystery word/phrase. If the guess is correct, BackEnd will send a new string, where appropriate characters have been filled in, to the UI manager. Methods getText() - opens a prepared text file and returns a randomly selected line using file.readlines() then randomly selecting using the random module to avoid duplicating a phrase in subsequent turns well use the pop() built-in on the file.readlines() list makeBlanks(<string>) - returns a string in which all alphabetical characters have been converted to underscores and all whitespace as empty strings. checkChar(<string>,<string>) - gets a single character string from the Interface and compares it to the mystery string to see if the guess is correct. If so, returns the new string containing the correct guess to the UImanager. If not, score is decremented. stringToList(<string>) - converts a string to a list of characters. Interface - get user input, reject if it is not the required type Methods readChar() - prompts the user for a character, returns the character as a string of one element. If the input is not a character, the user is prompted again to enter a character. readHighScore() - asks the user for their name as a string. After entry, the method will confirm that the user entered the correct string by printing it to the screen and giving them the option to reenter it. UImanager - manages whats on screen. Draws background. Draws a number of blank spaces corresponding to the length of the word or phrase that are filled as the user makes correct guesses. Methods (probably imported from Tkinter)

For Later Improve UI Different levels of difficulty Create a 2-player version of the game, allowing people to enter their own words and having others guess

Vous aimerez peut-être aussi