Question: using C programming, In the simple, text-version of Mastermind game that we are going to develop, instead of colors we simply use digits 1 to

using C programming,using C programming, In the simple, text-version of Mastermind game that we

In the simple, text-version of Mastermind game that we are going to develop, instead of colors we simply use digits 1 to 9. Therefore, codemaker (Computer) will randomly selects four unique, non- duplicated, digits and then codebreaker will start guessing the four digits. If the codebreaker guesses the correct code in less then or equal to ten guesses, s/he wins and otherwise loses. Then, the codebreaker has the opportunity to play again or just exit from the game. In each step of the game, proper message should be provided by the codemake (computer) to the codebreaker. For instance, at the beginning there would be a welcome message, followed by asking the codebreaker to guess the code. After each guess, an accurate feedback should be shown to the codebreaker. If codebreaker wins/loses, proper message showed be shown to the codebreaker as well. You can get some ideas from the sample execution of the program on page 4 of this document. Part B: Pseudocode: (40 marks) Using the above ame rules, write the pseudocode (formal or informal) for the Mastermind game. As a hint, we start it as follows, and you should complete it: 1. Start 2. Show a Welcome message to the player. 3. Generate a random code. 4. ... Complete the next steps X. Ask the player if they want to play again or not a. If yes, go to step 3 b. If no, show a Goodbye message and end the program X+1. End In the simple, text-version of Mastermind game that we are going to develop, instead of colors we simply use digits 1 to 9. Therefore, codemaker (Computer) will randomly selects four unique, non- duplicated, digits and then codebreaker will start guessing the four digits. If the codebreaker guesses the correct code in less then or equal to ten guesses, s/he wins and otherwise loses. Then, the codebreaker has the opportunity to play again or just exit from the game. In each step of the game, proper message should be provided by the codemake (computer) to the codebreaker. For instance, at the beginning there would be a welcome message, followed by asking the codebreaker to guess the code. After each guess, an accurate feedback should be shown to the codebreaker. If codebreaker wins/loses, proper message showed be shown to the codebreaker as well. You can get some ideas from the sample execution of the program on page 4 of this document. Part B: Pseudocode: (40 marks) Using the above ame rules, write the pseudocode (formal or informal) for the Mastermind game. As a hint, we start it as follows, and you should complete it: 1. Start 2. Show a Welcome message to the player. 3. Generate a random code. 4. ... Complete the next steps X. Ask the player if they want to play again or not a. If yes, go to step 3 b. If no, show a Goodbye message and end the program X+1. End

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!