Skip to content

Instantly share code, notes, and snippets.

@melcor76

melcor76/main.js Secret

Created November 25, 2019 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melcor76/458503e0bec4e37537bce3790fae86fd to your computer and use it in GitHub Desktop.
Save melcor76/458503e0bec4e37537bce3790fae86fd to your computer and use it in GitHub Desktop.
js-tetris - game over
function gameOver() {
cancelAnimationFrame(requestId);
this.ctx.fillStyle = 'black';
this.ctx.fillRect(1, 3, 8, 1.2);
this.ctx.font = '1px Arial';
this.ctx.fillStyle = 'red';
this.ctx.fillText('GAME OVER', 1.8, 4);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment