I'm following a HTML5 game tutorial on MDN. In JavaScript whenever my game loop re-calls its-self with
requestAnimationFrame(gameLoop);
There
fillSytle = "someColor";
option of one the functions being called in my game loop changes the color of every other shape unless I give all the shapes same color.
How can I give different styles or colors to different shapes in game Loop?