Question: Write mastermind game in C++. Rules: Your program needs to choose a secret combination of colored pegs (use random function to do that) Number of

Write mastermind game in C++.

Rules:

Your program needs to choose a secret combination of colored pegs (use random function to do that)

Number of guesses is 12.

Colors include: Yellow (Y), Red (R), Orange (O), Blue (B), Pink (P), and Green (G).

The combination of peg colors could contain anything from 4 different colors to 4 of the same color.

After each guess, your program needs to show the user how they have guessed. For each guess (C) indicates that one of your pegs is the correct color in the correct position. A (W) indicates that one of your pegs is the correct color in the wrong position.

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 Databases Questions!