From 32f23188b63c8995f1a5aa6efbc62e5e616250fa Mon Sep 17 00:00:00 2001 From: elioat Date: Thu, 31 Oct 2024 07:59:01 -0400 Subject: * --- html/broughlike/broughlike.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'html/broughlike') diff --git a/html/broughlike/broughlike.js b/html/broughlike/broughlike.js index 5f0863f..2960c95 100644 --- a/html/broughlike/broughlike.js +++ b/html/broughlike/broughlike.js @@ -1,10 +1,12 @@ import { CONFIG, COLORS } from './config.js'; +// FIXME: canvas, ctx, and tileSize are all globally available and regularly accessed. +// I'd like to refactor this to be more modular so that these can all be contained to the CONFIG object. const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); let tileSize = canvas.width / CONFIG.GRID_SIZE; -let highScore = localStorage.getItem('highScore') || 0; +let highScore = localStorage.getItem('highScore') || 0; const player = { x: 0, y: 0, -- cgit 1.4.1-2-gfad0