Part 3 of 3: This is the part you were asking about. The coin checks if the player collided with it. If so, we play a sound, decrease the coins remaining and add to the score. After that we release the sprite from use. I also have a function for drawing the score on screen that is overdone. I use gputchr so I can use gprio to put it over top of the sprites and background.