Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in java please follow the steps accurately Problem 3: Mastermind or Master Mind is a code-breaking game for two players. One player becomes the code-

image text in transcribed

in java please

follow the steps accurately

Problem 3: Mastermind or Master Mind is a code-breaking game for two players. One player becomes the code- maker, the other the code-breaker. The game rules of your program: The code-maker chooses a pattern of four code Letters as a subset of the following 8 alphabetic letters { A, B, C, D, E, F, G). The code cannot include duplicates and blanks. The chosen pattern is placed in an input file, entered by the code-maker but not known by the code- breaker The code-breaker tries to guess the pattern in the right order in both orders, within twelve turns. Each guess is made by placing a row of code patterns on the decoding board. Once placed, the program provides feedback by placing from zero to four key characters after each row of guess. Character Y feedback is placed for each code patters from the guess, which is correct in both character and position. Character X feedback indicates the existence of a correct Character in the code but placed in the wrong position. If the guess of code-breaker is already has been provided in one of the previous steps, the game refers back to the feedback number. The duplicated guess will not be counted. The program print at the end all the guesses Hint: Use a 2D array and place the code-maker pattern in the first row. Then all code-breaker guesses in the following rows. Then make simple comparisons. Your program will be a modified version of the Mastermind traditional board game. The traditional game rules available in this video: https://www.youtube.com/watch?v=dMHxyulGrEk Example: If the code-maker input in the file FGBA Code-breaker Guess: ABCD Feedback 1: XX Code-breaker Guess: ABEF Feedback 2: X X X Code-breaker Guess: A BEG Feedback 3: X X X Code-breaker Guess: A BFG Feedback 4: XXXX Code-breaker Guess: B AGF Feedback 5: XXXX Code-breaker Guess: A BEG Repeated guess! Feedback 3: XXX Code-breaker Guess: GFBA Feedback 6: Y Y X X Code-breaker Guess: FGBA Feedback 7: You win by 7 rounds

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

DISCUSS competency-based pay.

Answered: 1 week ago