Algorithm for “Ride the Cota” Game:
- Create a game welcome screen to show game.
- Display the rules and instructions to game.
- Display various statistics such as prior game logs and high score recorded with lowest number of tries for victory.
- Display credits and who wrote the game (see above)
- Use DrawRectangle on QT Creator environment
- Display four face down cards on screen after menu.
- Create a 2D character array that is 52 by 2 for each card
- Display four cards initially on screen.
- Display another menu similar to welcome for first prompt with two choices “Black or Red?”
- Offer user choice of black or red
- Scan in option from user
- Display the result of unknown first card
- If user chooses correct option, proceed in game.
- If incorrect, end game with display message and “sad” music.
- Display “Wrong!” screen to user
- Display another choice menu similar to previous prompt with two choices “Over or Under?”
- Offer user choice of over or under
- Scan in option from user
- Display the result of unknown second card.
- If user chooses correct option, proceed in game.
- If incorrect, end game with display message and “sad” music.
- Display “Wrong!” screen to user.
- Display another choice menu similar to previous prompt with two choices “Inside or Outside Previous Cards?”
- Offer user choice of inside or outside.
- Scan in option from user
- Display the result of unknown third card.
- If user chooses correct option proceed in game.
- If incorrect, end game with display message and “sad” music.
- Display “Wrong!” screen to user.
- Display final choice menu for last prompt with FOUR choices “Clubs, Diamonds, Hearts or Spades?”
- Offer user choice of suit
- Scan in option from user
- Display the result of the final card.
- If user chooses incorrectly, end game with display message and “sad” music.
- Display “Wrong!” screen to user.
- If all 52 cards are played, display “You Lose!” message to user and give menu below.
- Display “Tap Screen To Play Again”, “Menu”, or “Quit”.
- Use a loop to return to beginning of game and prompt user with welcome screen.
- If user chooses correctly, end game with display message and “happy” music.
- Display “Congratulations, You Have Won The Game!”
- Display number of tries it took to win the game.
- Scan in this value and add it to the statistics class located in step 3.
- Finish