There is a button in the middle of the screen for “Start New Game”.

computer science

Description

For this project, you will create a memory game similar to the game called “Simon”. This video explains the game if you do not know what it is: https://www.youtube.com/watch?v=1Yqj76Q4jJ4


You should use the C++ library called Nana for doing the graphical interface and for playing the audio.

 

Requirements:

1.      There is a button in the middle of the screen for “Start New Game”. If you click this button, the game will start by the program generates a random sequence of 1 colour.

 

2.      There are 4 buttons around the middle representing RED, GREEN, YELLOW, and BLUE.

 

3.      The game shows the sequence by lighting up one of the buttons for 0.5 seconds and playing one of the 4 music notes.

 

4.      Once the program has shown the sequence, the user must then click the 4 colour buttons in the same order that the program generated. If the user presses the correct sequence, then the program adds one more colour to the sequence and you repeat.

 

5.      If the user types in a wrong colour that is not the next one in the sequence, then the program should show a message saying that they picked the wrong colour, and at what level of the game they made it to. For instance: “Sorry, wrong colour. You made it to round 6 of the game”. This means they were attempting to recreate a sequence of 7 colours when they typed in the wrong colour. The user should then be given the option to play the game again, or to quit. If they choose to play again, then the game starts over. If the user chooses to quit, then the game ends.

 

6.      If the user doesn’t hit a button within 5 seconds of the last button they hit, then the game is over and the program shows the same end game message as in step 5.

 

7.      Hints: You should use a std::vector object to store the correct colour sequence, and integer to show what step of the sequence that the user is currently picking. When the user finishes a sequence correctly, generate a new random colour and add it to the correct sequence. Then the integer resets to 0, and the user starts clicking on the colour buttons to start the new sequence all over again.

 

Marks:                                                                                     Total of 13 marks

GUI Window shows 4 colour buttons and a “start game” button                              +2

The game can generate and show a randomly generated sequence                                    +2

The program successfully detects a user clicking on the right colour button and plays a correct sound                                                                                                                        +2

The program successfully detects a user clicking on the wrong colour button and plays a game over sound                                                                                                   +2

The game shows the user a game over message with the correct round that they reached                                                                                                                       +2

If the user doesn’t hit a button within 5 seconds then the game ends.                     +1

At the end of the game, the user is presented the option to quit or play again       +1

The GUI is neatly laid out with buttons properly placed on the screen                     +1

 


Related Questions in computer science category