Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your Simon game must have the equivalent of three buttons. We recommend using integers (e.g., 0, 1, 2) for this so that each round involves

image text in transcribed

Your Simon game must have the equivalent of three "buttons." We recommend using integers (e.g., 0, 1, 2) for this so that each round involves printing a sequence of numbers and having the user repeat this sequence, one number at a time, and then having the user type an additional number, but if to use characters (e.g., 'r', 'g', 'b'), you may use them instead. To make your button equivalences more clear to a user, please have your program start with a message similar to the following: "Welcome to the Simon game. Sequences will be made up of numbers 0, 1, and 2." The first round of your game must present only one number (or character) for the user to repeat. The user should be asked to repeat this 'sequence' and to add an additional number. Each subsequent round must present the same sequence to the user as that in the prior round with two additional numbers (or characters) at the end: (1) the number/character that the user added to the end of the sequence in the prior round and (2) a randomly generated new number/character. Note that at the beginning of round n, the sequence that will be presented to the user should be of length 2n - 1 and at the end of the round (when the user types a sequence back), the sequence length should be 2n (as the user has added a number to the sequence). The game must end as soon as a number (or character) in the sequence is incorrect. For example, if the user needs to repeat a sequence of length 5, but enters an incorrect number in the middle of the sequence, the game should end at that point rather than waiting until the user enters all numbers. The game must also end if the user selects an ineligible number to be added to the end of the sequence (i.e., trying to repeat the last number or adding a number that doesn't exist in the game). Your Simon game must be able to last for at least 6 rounds. After 6 rounds, it is okay to directly say that the user wins rather than requiring the game to continue until the user fails. Each time you run the program, the user should be presented with a different sequence (so you will need to be able to randomly generate the numbers to be filled into the computer-generated portions of the sequence)

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

2. Record these without judgments, criticisms, or comments.

Answered: 1 week ago

Question

What is Working Capital ? Explain its types.

Answered: 1 week ago