Appearance
CS101 Word Game: Word Heist
python
import wordheist.MyWordGame as wg
words = wg.WGLib.parseWordsFile('lowerwords.txt')
wg.startSession(words)Brief Description
Word Heist is a fast-paced word-building game where the player “steals” letters from a shared pool to form as many valid words as possible before the pool runs out. Each word earns points based on its length, and used letters disappear from the pool. The goal is to maximize your score by crafting the longest and most creative words from limited resources.
Settings
At the game start, the player is prompted for two settings:
Turns: The player may enter a value from 1-12, denoting the number of turns they will have. Consonants: The player may enter a value from 1-21, denoting the number of distinct consonants in the pool at the start of the game (all vowels are automatically included in the letter pool).
Rules of Play
The game begins with a fixed number of turns and a shared letter pool containing all vowels and a player-chosen number of distinct consonants. The goal is to earn as many points as possible by the end of the game.
On each turn, the player enters a word using only the available letters. A word w is valid if and only if:
w has not been used previously, w can be spelled entirely with the letters in the current pool (multiples allowed), and w appears in the reference word file (lowerwords.txt). Invalid words are rejected, and the player is reprompted. If the player submits an empty input, the game ends immediately and all remaining turns are forfeited. For each valid word, the player earns points equal to the word’s length. All consonants in that word are removed from the letter pool, while vowels remain available for reuse. The game ends when the player runs out of turns, enters no word, or no valid words can be formed. The final score is then displayed.