I'm learning HTML 5 and I was trying to make my own Craps game.
Now the idea is that when the "Reset" button is pressed, all values will go back to the default and the canvas will be cleared. However when I do it, the image of the dice are still in the canvas.
Now I don't think there's anything worng with this:
ctx.fillStyle = "red";
ctx.fillRect(0,0,900,900);
but it doesn't work when it's in the reset method. When I put it in other method it works.
Here is the site and code is in it if anyone wants to see: