Appearance
CS101 Word Game: Word Chain Challenge
python
import wordchainchallenge0.MyWordGame as wg
words = wg.WGLib.parseWordsFile('lowerwords.txt')
wg.startSession(words)Brief Description
Word Chain Challenge tests your quick thinking and vocabulary under pressure! Each word you enter must begin with the last two letters of your previous word — and the chain keeps growing. How long can you keep it going before you run out of words?
Settings
Before each game, you choose: Rounds: Number of turns to attempt (suggested 3-10; reprompt until valid).
Minimum Word Length: A lower bound (suggested 4-8) for valid words.
Hint Option (optional, on by default): Typing '?' prints a harmless hint. Hints never affect validity; they only display information.
Rules of Play
The chain begins empty. On the first turn, enter any valid English word (≥ Minimum Word Length).
On each subsequent turn, your word must: be alphabetic and lowercase letters only (a-z); meet or exceed Minimum Word Length; start with the last two letters of the previous valid word; not have been used previously in the current game; exist in lowerwords.txt.
Commands: Press ENTER on an empty line to end the game early (ends the current session immediately). Type '?' to print a hint (does not change the game state; does not validate a guess)
Scoring: Valid Word: + (word length) + (current streak), where streak starts at 0 and increases by 1 after each valid word. Invalid Word (fails any rule above): No score change; you must enter another word for that turn (reprompting continues until a valid input). Survive all chosen rounds (i.e., you provide a valid word each turn):+10 bonus at the end.
End of Game: Game ends when you complete all rounds, or you press ENTER on an empty input to end early. Final score is printed (positive score = you "survived well").