Appearance
CS101 Word Game: Word Ladder Challenge
python
import wordladderchallenge.MyWordGame as wg
words = wg.WGLib.parseWordsFile('lowerwords.txt')
wg.startSession(words)Brief Description
Transform one word into another by changing a single letter at a time. Each intermediate word must be a valid English word. Reach the target word in as few steps as possible to earn a higher score.
Settings
Before the game starts, the player chooses two options that control difficulty and pacing:
- Word Length (3–6 letters)
- What it does: Filters the dictionary so all words in the ladder have exactly this length.
- Allowed values: Any integer from 3 to 6 (inclusive).
- Validation: If the input is not a number in this range, the game reprompts. If no words of that length exist, the game asks for a different length.
- Max Turns (default = 10)
- What it does: Sets how many moves the player can make before the game ends. Each valid word entered consumes one turn.
- Allowed values: Any positive integer; pressing Enter accepts the default 10.
Rules of Play
The game chooses a random starting word and target word of the same length. Each turn, you type a new word that differs from your previous word by exactly one letter. Every word must exist in the dictionary (lowerwords.txt). You win if you reach the target word. You lose if you exceed the allowed number of turns. Invalid entries (not a real word or more than one letter different) will prompt you again.