Appearance
CS101 Word Game: How's Your Vocab?
python
import howsyourvocab.MyWordGame as wg
words = wg.WGLib.parseWordsFile('lowerwords.txt')
wg.startSession(words)Brief Description
The game's primary objective is to test the player's ability to generate lengthier words. Sure, it may not always be the case that longer, more complex sounding words equate to intellect, but if you want to score high in this game, it does.
Settings
At game start, the player is prompted for two settings:
- Turns: The player may enter between 1-20, denoting the number of turns/guesses they will have.
- Minimum Word Length: The minimum word length is the minimum number of characters the player's guess must contain.
- Required Letter: A letter of the player's choice that must be present in their guess.
Rules of Play
The game consists of a fixed number of turns that the player chooses whe prompted. The player is also prompted for a minimum word length for the words they generate and a required letter between 'a-z' that must have membership within the word. When the game starts, the user has to come up with words of the greatest length that fit their own self-constructed criteria on their own. If the player guesses something invalid, the code will print "Invalid input. Please enter a valid word." The user will then have to reconsider the criteria and try again. For valid guesses, the player earns a point for every character a word contains. When the game ends after the player's turns have run out, the player is asked if they want to play again (y) or not (n).