Jotto!

Jotto is the official CS 189 word game. In its honor, this problem asks you to implement a simple jotto-playing program, and you will have the option of continuing to improve it as the course progresses.

In order to encourage you to explore other languages, you should feel free to implement jotto in any language that turing can run. If it's something other than C++ or Java, however, you should explain in a comment at the top of your file how to run it...!

The problem

Jotto is a two-player game similar to mastermind. Instead of colored pegs, each player chooses a hidden word. Then, players alternate guessing words (typically only dictionary-entry, lowercase words): for each guess, the opponent reveals the number of letters that match between the guessed word and her/his hidden word. The first player to guess the opponent's hidden word -- or an anagram of it -- wins. Typically, the game is played with 5-letter words.

Your task is to implement a program that plays a game of jotto, though not necessarily very strategically... . You should find a word list, lots are around online, and then create a command-line interface (unless you want to spend time writing a GUI). This program doesn't have to meet the strict I/O requirements of the other ACM programs -- instead, I'll simply run it and follow whatever interface directions you provide.

Example

The following is just an example of a program run -- feel free to create any variation you'd like... . The user's input is in bold.


  Welcome to Jotto! 

  I have chosen a 5-letter word.
  When you have chosen one, go ahead and make a guess.
  
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Status:     My guesses (computer)      Your guesses (noncomputer)

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  Your guess:  diner

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Status:     My guesses (computer)      Your guesses (noncomputer)

                                         diner  1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  My guess is "shahs"    What score does it get?  1

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Status:     My guesses (computer)      Your guesses (noncomputer)

              shahs  1                   diner  1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  Your guess:  robot

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Status:     My guesses (computer)      Your guesses (noncomputer)

              shahs  1                   diner  1
                                         robot  2
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  My guess is "xylyl"    What score does it get?  1

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Status:     My guesses (computer)      Your guesses (noncomputer)

              shahs  1                   diner  1
              xylyl  1                   robot  2
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  Your guess:  lulls

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Status:     My guesses (computer)      Your guesses (noncomputer)

              shahs  1                   diner  1
              xylyl  1                   robot  2
                                         lulls  1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  My guess is "syrup"    What score does it get?  5

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Status:     My guesses (computer)      Your guesses (noncomputer)

              shahs  1                   diner  1
              xylyl  1                   robot  2
              syrup  5                   lulls  1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  I win! You should have tried something else...
  
  My word was "sorry" as in "sorry, I win!"