function clearScreen(){
  context.fillStyle = 'white';
  context.fillRect(0,0,canvas.width,canvas.height);
  if(canvas.height > window.innerHeight){
    canvas.height = window.innerHeight;
  }
}
//function for erasing the whole canvas
function for erasing the whole canvas
function for erasing the whole canvas
function clearScreen(){
  context.fillStyle = 'white';
  context.fillRect(0,0,canvas.width,canvas.height);
  if(canvas.height > window.innerHeight){
    canvas.height = window.innerHeight;
  }
}
function clearScreen ( ) { context . fillStyle = 'white' ; context . fillRect ( 0 , 0 , canvas . width , canvas . height ) ; if ( canvas . height > window . innerHeight ) { canvas . height = window . innerHeight ; } }
function for erasing the whole canvas
function for erasing the whole canvas