Skip to content

Instantly share code, notes, and snippets.

@bashbaugh
Last active February 27, 2019 02:03
Show Gist options
  • Save bashbaugh/fa2ac39ff792a8e95c63a3ca00fc8c08 to your computer and use it in GitHub Desktop.
Save bashbaugh/fa2ac39ff792a8e95c63a3ca00fc8c08 to your computer and use it in GitHub Desktop.
function update()
{
// IF GAME DURATION SO FAR IS LESS THAN game_duration:
// Compare player coordinates to dot coordinates to see whether the player is above a dot. Increment score if so.
// Check distance from highest dot to top of screen. If greater than dot_distance_apart, create a new dot at top.
// ELSE:
// Set game_over to true.
// Clear the canvas and draw the background.
// Draw dots and move them down the screen.
// Ensure that player is within canvas
// Draw player onto screen.
// Draw score onto screen.
// IF game_over:
// Draw game over screen
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment