In today's lab, we will be learning how to handle input detected on hardware devices and implement the fundamental logic for a 2D game.
3 more conditional statements that detect action and direction.
3 more custom functions: go_up() , go_left() and go_right() that update appropriate variables, player_x or player_y by either increasing or decreasing the value.
Only modify the value if the value is less than the number of pixels in that direction.
Make sure to call the appropriate function in the conditional statement.
Print out the updated variable to make sure it is all working.
Write a function named eat()
The function should keep the game going after the player eats the food
Options:
Make an animation with a character of your own design to simulate eating, success, celebration, etc.
Declare a variable to hold the food amount, or points. Increment that amount when you reach the food.
Add a scrolling text message to notify the user, maybe with a score.