Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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: 3

blur-text-image

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

Students also viewed these Databases questions