mardi 15 octobre 2019

random color generator for spawn apples

Given this fillstyle, I want to replace the fillstyle with a random color generator.It's a snake game for my college project.

` // draw apple


  context.fillStyle = 'red';

  context.fillRect(apple.x, apple.y, grid-1, grid-1);` 

how can i do it?




Aucun commentaire:

Enregistrer un commentaire