Appearance
CS101 Word Game: Guess-a-Word
python
import guessaword.MyWordGame as wg
words = wg.WGLib.parseWordsFile('lowerwords.txt')
wg.startSession(words)Brief Description!
"Guess-a-Word" is a single-player word-guessing game that is similar to Wordle. The user chooses a word length, and then guesses the secret word letter-by-letter.
Settings
Word length: The user chooses an integer from 3 to 7. This represents how many letters the secret word will have. Attempts? The user has length of secret word + 3 attempts to guess the word!
Rules of Play
- At the start of the game, the user chooses a word length from 3 to 7. A secret word of that length is then selected from the word list.
- Each turn the user inputs a guess that:
- Contains only letters,
- Has exactly the chosen length,
- Appears in the word list (lowerwords.txt).
- After each guess you get feedback regarding the user's input (Exactly Like Wordle):
- G : The letter is correct and in the correct position.
- Y : The letter exists in the secret word but is in the wrong position.
- : The letter is not in the secret word.
- The user wins if they guess the secret word within the allotted attempts. The score equals the attempts remaining when you guessed it—otherwise, the score is 0.
- After the game ends, the user can choose to play again (y) or quit (n).