-
Notifications
You must be signed in to change notification settings - Fork 1
Python OF Fortune Game Functionality
Python of Fortune
Team 4
Base game is Wheel of fortune
Use movie quotes as answers
Break up movie quotes by words
As User guesses word, he/she can play the audio of the quote which will only play the guessed words (with spaces)
If they guess the quote, then they can play back the completed audio
We can build a random number generator that lists the numbers and then the one that the player lands on – this can be …..with sound effects.
When they guess the quote we can also display the movie poster that the quote is from.
Like Wheel of fortune, they start out with a certain amount of money, and every time they spin, their guesses are …..worth the amount that comes up using the random generated function. They are then added to their running total. If …..they guess wrong, that amount is deducted from their total. If they hit zero money, they lose.
-———————————————————————————-
Game sound list:
Spinning Sound + Final result [Wheel Spin]
Wrong Answer (Buzz)
Right Answer (Ding Ding Ding)
Congrats You Won! (Ta DA!)
You Lost (DA Da da)
-———————————————————————————-
Pseudo Code Functionality List
Variables:
userRunningDollarTotal: User starts with $1000
dialogClip – eventually to be a list of 8 clips; only one to start with
finalDialog – original dialog string
userGuesses – list of letters guessed
phraseState – dashes and letters based on what’s been guessed so far (add punctuation from dialog to the phraseState automatically)
spinTheWheel(): Random Number generation with sound (in dollar form) returns value for letter to choose (10 numbers between 0 – $990)
userMenu(): All options available to user to play the game.
Exit
Spin the wheel
display board status
play dialog (only available after first word has been completed)
notify player if no words complete yet
gameBoard(phraseState): display and update game board with letters and completed words
guessConsonant(guessedLetter): get input, check that it’s a consonant, update board status,
If user chooses letter that already has been chosen, play error sound, and tell user you already guessed that, try again.
If user chooses letter that doesn’t exist, they lose the $$
exeGuess(guessLetter): return int
randomDialogChooser()
playCurrentSound()
FUTURE ADD?
warn user if their current guess amount is equal or greater than their remaining dollar amount, then this could be their last guess.
additional dialog options for the game
buy a vowel?
as for user name at beginning of game
dialogClip #sound file
dialogIndex = 0,3], [4, 10], [11, 20], [21, 30
dialogString = “I had no idea you could milk a cat!”
def pythonOfFortune():
userRunningTotal = 1000
print “welcome message”
print “please load sound file”
dialogClip = prompt user to pickAFile(sound file)
userMenu(dialogClip)
def userMenu():
userRunningDollarTotal = 1000
userGuesses = []
phrases = loadPhrase(dialogString)
finalDialog = phrases0
phraseState = phrases1
stillPlaying = true
-
WENDY ######
def exeGuess(guessLetter, currentAmount, userRunningDollarTotal, userGuesses, finalDialog, phraseState):
#return 1 if game continues, 0 if game ends, -1 if reprompt necessary
check userGuesses to make sure guessLetter is not already guessed
if already guessed
play sound buzzer
print notification
return true
else
userGuesses.append(guessLetter)
if guessLetter is in finalDialog
play sound dingdingding
n = count how many times
userRunningDollarTotal += n*currentAmount
update phraseState with guessLetter
if finalDialog == phraseState:
print game win notification
play complete sound
show movie poster
return false
if guessLetter is not in finalDialog
play sound buzzer
userRunningDollarTotal -= currentAmount
if userRunningDollarTotal < 0
userRunningDollarTotal = 0
print game loss notification
play (loser sound)
return false
-
BILL ######
def printPhrase(phraseState):
stringMessage = “”
for word in phraseState:
for letter in word:
stringMessage += letter + “ “
stringMessage += “ “
print stringMessage
-
CHRIS ######
def playSound(phraseState):
for word in phraseState:
wordComplete = true
for letter in word:
if letter == “_”
wordComplete = false
if wordComplete == true
play section of dialogClip at normal volume
else
play section of dialogClip at 0 volume
-
BILL ######
def spinWheel():
ranDollars = random.int()
x = 0
play(start spin sound)
while x < 10:
print random.int()
x += 1
print “\n”
print “\n”
play(ding finish spin sound)
print ranDollars #End of spin dollar amount for user
return ranDollars
(INDEXING EXAMPLE FOR DIALOG)
finalDialog = i],[w,i,l,l],[b,e],[b,a,c,k
phraseState = _],[_,_,_,_],[_,_],[_,_,_,_
phraseState10
Form Questions
Number of team members
4
Team member names
Brian Begun, Chris Dixon, Bill Gillihan, Wendy Gray
project Title
Create a clear and concise project title for your project
Python of Fortune
Write a clear description for the final product to be produced by this project
We are creating a twist on Wheel of Fortune using movie quotes as the phrases to be guessed. The player will be able to spin a wheel for random amounts of money to be added or subtracted from a running total depending on whether or not the letter guess is correct. The player will have the option to play a sound clip of the quote, which will play the sound of completely-guessed words, with blank sounds for incomplete words. So as more words become complete, the quote sound would also become more complete. When the entire quote is complete, a movie poster will display and congratulations text included.
Write clear division of responsibility within the team. *
This is a general plan – you can make changes later
Brian will make the master sound file and map indices to each word and quote; will set up the menu of options for the user
Chris will take the current guessed phrase and play the dialog sound, checking for whether or not a word is complete to play that portion of sound; blank sound otherwise.
Bill will create the wheel spinning functionality, including random money amounts; will parse the quote strings into lists for functionality
Wendy will take the guessed letter and update the guessed phrase and player’s money; will check for win/lose conditions.
Write a plan containing intermediate milestones by which you are going to complete this project
This is a general plan – you can make changes later
12/2 – Brainstorming for project idea
12/3 – Brainstorming / finalize idea
12/5 – Workflow/Game Functionality through pseudo code
12/6 – Workflow/Game Functionality through pseudo code: Part II
finalize division of project by team member
12/9 – Work-in-progress of game & testing
12/11 – Initial completion of game & testing
12/13 – Add functionality
capability for more quotes
12/14 – Debugging & Testing
12/15 – Debugging, Testing, & Assignment submission
https://github.com/begunfx/CST205_FinalProject
https://github.com/begunfx/CST205_FinalProject