Appearance
CS101 Word Game: Jotto-like Word Game Against Computer
python
import jottolikewordgameagainstcomputer.MyWordGame as wg
words = wg.WGLib.parseWordsFile('lowerwords.txt')
wg.startSession(words)Brief Description
In this game, you will play a word game that is very similar to Jotto against a computer. You and the computer will take turns making guesses about the other's secret word and will get feedback regarding the number of letters in these guesses that are also contained in the secret word. The goal of the game is to guess the computer's secret word before the computer can guess yours. The computer's algorithm for guessing words (while efficient) can be beat with sound human logic and reasoning.
Settings
The only user-chosen setting for this game is whether you go first guessing the computer's word or the computer goes first guessing yours. Allowing the computer to go first will make this game slightly harder as the winner is whoever guesses the other's word first (without any consideration for how many guesses each player has had or who went first).
Rules of Play
In this game, you and the computer will each choose a secret word and will take turns guessing the other's word. The winner of the game is whoever can guess the other's secret word first. Every secret word and guess must be a real, five-letter word. You may not guess a word more than once. When you or the computer make a guess, you will be given feedback about the "number of correct letters" in the guess. This is where this word game differs slightly from most versions of Jotto. In the context of this game, a correct letter is any letter that appears both in the guess and the secret word (without taking into consideration the number of these letters in the words or their uniqueness). For example, let's imagine that the computer's secret word is "apple", and your guess is the fake word "aaaaa" (in the real game, this is not possible because guesses must be real words; however, for the sake of example, let's pretend this is a valid guess). In this case, you would be told that the guess has 5 correct letters because all 5 of the letters in the guess appear somewhere in the secret word (it does not matter that we are counting the same "a" in the secret word 5 times) . This method of tracking letters "in common" makes the game somewhat more difficult than most Jotto variants. In terms of scoring, you are awarded 1 point for a win agains the computer and 0 points for a loss.