Sign in

For this assignment, I got inspiration from the following 3 images:

I wanted to create a game with some sort of object falling from the sky, with the goal being to catch as many as possible as the object begins to fall faster and faster until you miss. I decided to do this with a monkey catching falling bananas to draw more complex images. I used function banana() and function monkey () to create these complex images. With function monkey(), I incorporated mouseX so that it moves across the horizontal display with the movement of the mouse. I also used conditional statements to make it so that the banana regenerates in a random spot on the screen if it is caught by the monkey or for the game to end if the monkey does not catch the banana. My pseudocode can be seen in the CodePen sketch below:

Learning how to program