Design 3


OpenFile

while not done
    Get A Word from the file
    Play Game
    games++
    if player wins
        wins++
    ask player if they want to play again

CloseFile
Print Statistics

Procedures

PrintStatistics(gamesPlayed, wins) print gamesPlayed print wins string GetAWord(file) read a word if (not successul reading from the file) close the file reopen the file read a word Remove blanks and lowercase the word return the word string FixAWord for each letter in the word if the letter is '_' make the letter ' ' Bool PlayGame (takes word, return true if win and false if los) initialize variables while not complete and bad letters < 6 DisplayGameStatus get a letter if letter is in the word add the letter to the display word else add the letter to the bad guess list Announce Win Or Loss ...