snake: add some misc tweaks to game and page #8

Merged
Trianta merged 2 commits from snake into main 2024-11-09 01:42:25 -06:00
Showing only changes of commit 532d8a480c - Show all commits

View File

@ -64,7 +64,7 @@ class SnakeCore {
this.canvas = document.getElementById('snake') as HTMLCanvasElement; this.canvas = document.getElementById('snake') as HTMLCanvasElement;
this.context = this.canvas.getContext('2d') as CanvasRenderingContext2D; this.context = this.canvas.getContext('2d') as CanvasRenderingContext2D;
this.grid = 25; // size of grid squares this.grid = 25; // size of grid squares
this.timeout = 100; // speed in ms this.timeout = 20; // speed in ms
this.width = 25; this.width = 25;
this.height = 15; this.height = 15;
this.board = []; this.board = [];