Press the green flag and then with your cursor move the grandpa so that it does not touch the dragon if it touches the dragon it will tell you your score and then the game will stop. So then you will have to start again.
Thanks to Google CS First for teaching me how to code this project.