D. Final Algorithm, Flowchart, or Pseudocode

Algorithm for Memory Game:

Declare Simple Game Engine.

While loop until user input’s exit value.

Declare number of match attempts needed to 0.

User clicks on two cards unflipped cards.

Increment number of match attempts by 1.

Compare card values, if same keep them flipped up otherwise flip them back over.

Once all cards are flipped over, display a screen which shows final amount of match attempts.

Ask user if they want to play again, if they do return to top of while loop otherwise program closes or something.

 

 

Click Adventure:

Declare simple game engine.

Get first sprite on sprite sheet

Display game screen.

While loop happens will the user is not pressing ‘s’, which happens 30 times per second.

Detect user input by accepting input.

Loops until player presses the moon in the middle

If the right key is pressed switch to the next game sheet, which has another sprite sheet

When player presses the right key on the last game sheet bring them to next sprite sheet page.

Let the user decide if they want to restart or end the game if they finish.