Created
February 26, 2019 01:45
-
-
Save bashbaugh/84c55210b16b144b41b7093bb9c116ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// there is one number in dots_x for each dot, so dots_x.length is equal to the number of dots. | |
// For every dot: | |
for (i = 0; i < dots_x.length; i++) | |
{ | |
// if dot's x is same as player's x and dot's y is same as player's y | |
if (dots_x[i] == player_x && dots_y[i] == player_y) | |
{ | |
score += 2; // Increment score by two. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment