diff options
author | elioat <elioat@tilde.institute> | 2024-10-31 07:59:01 -0400 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-10-31 07:59:01 -0400 |
commit | 32f23188b63c8995f1a5aa6efbc62e5e616250fa (patch) | |
tree | 83e506bddf8b6b91630462c557614034f56ee79b /html/broughlike/broughlike.js | |
parent | 9aba1d9aa7a212a14862a0aecf1e3495fd18e13d (diff) | |
download | tour-32f23188b63c8995f1a5aa6efbc62e5e616250fa.tar.gz |
*
Diffstat (limited to 'html/broughlike/broughlike.js')
-rw-r--r-- | html/broughlike/broughlike.js | 4 |
1 files changed, 3 insertions, 1 deletions
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, |