Homework
For this homework, you are going to create a game. It should be made up of a bunch of simple shapes (they can be the same or different). After you place them on the screen, you should move them around the screen randomly. If they leave the screen, you should have them go to the other side of the screen. You should also have a way to place an obstacle onto the screen with your mouse. Once the player moves off the screen through the exit, you should display a message that says “You Win!”. Don’t worry about any collisions.
Homework Walkthrough Video
Homework Example
Specifications
- Create a canvas
- Create a player.
- Move the player using the keyboard.
- Place multiple obstacles (at least 2) of different sizes and colors on the canvas.
- Move the obstacles randomly around the canvas. If an obstacle leaves the screen, have it come back on the opposite side.
- If the user clicks the mouse, add a non-moving obstacle to the screen (only need one).
- Create a visual exit on the canvas
- If the player goes through the exit, a message should appear indicating that they won
- Use if/else, if/else if statements.
- Use logical operators. (at least one of them)
- Ignore all collisions.
- Take the Kahoot Quiz
- Upload everything to your repository and turn in your link.