She wants the game to start with the startGame function and then the score should go up by one when the dog moves the baby pigs. After a score of 3, it should change to You won! endGame function.
What is happening is it is starting with the endGame screen and not much else.
I’ve tried moving functions, etc. but everything I do does not work or make s things worse.
Cute game! The first thing I did to see why the endGame() function was running first was to enter the “score” variable into the watcher. It was quickly counting past 3 so it triggered almost immediately. I believe the reason why this happens is because baby3.y adds one to score if it is >=30 but it starts at 200 so it instantly begins adding to to score. To begin fixing, change line 53 so that baby3.y doesn’t automatically add to score (make the number larger) and the game should work. Hope that helps but let us know if you have other questions.
~Michelle