Question: Collaboration Policy: This assignment must be completed individually. You may discuss high-level ideas with other students, but you should not share code. as Description C

 Collaboration Policy: This assignment must be completed individually. You may discuss

high-level ideas with other students, but you should not share code. as

Collaboration Policy: This assignment must be completed individually. You may discuss high-level ideas with other students, but you should not share code. as Description C The goal of this homework assignment is to create the basic infrastructure for the game Mastermind (a code guessing game between two human players). Player 1 provides a secret code and Player 2 tries to guess what it is using feedback she received from previous guesses. Player 1 first enters the secret code by entering a response to an "ask" block. A secret code is 4 letters long (no spaces), where each letter is one of ROYGBV (the first letters of the standard colors of the game: Red, Orange, Yellow, Green, Blue, Violet). You are allowed to have repeated letters in your code. Example secret codes: RRBG, OYOO, BROY, VVVV, etc. The word is immediately hidden from view after Player 1 finishes entering it. The computer then starts by telling Player 2 to try to guess the code. After Player 2 makes a guess, the computer should tell the player whether her guess was right or wrong. (Guesses should be case-insensitive.) If Player 2 was wrong, the computer should also tell Player 2 in what places the letters matched the solution (if any). The conversation alternates back and forth until Player 2 guesses the code correctly. Assume the user always types a four-letter code made up of these letters: ROYGBV. That is, we don't ask that you do any error checking

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!