Hi I am trying to make my score go up by 1 if it touches apple and go down one if it touches the pizza. I have set the code up but when it touches it, the score goes up really quickly. I also need to create a function or code where if the score is >8 game ends and says “You win” or health is <4 and says “You lose” using an if/else statement.
Any help is apperciated. Thank you
[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]
Link to the project or level: [replace with link to the curriculum or get the “Share” link to a project]
What I expect to happen: [replace with a detailed description of the behavior you’re trying to create]
What actually happens: [replace with a detailed description of what actually happens when the code runs including any errors or unexpected behavior]
What I’ve tried: [replace with a detailed description of what you’ve already tried to do to solve the problem]