Finally, no game would be complete without a user interface to display the player's score and health. In order to do this we will need to adjust the game frameworks
draw method to allow text to be drawn to the canvas as well as introduction a number of variables which monitor and update the player's score and health.
var score = 0; var health = 100;
Drawfunction place the following code before the