From 658c1c71c6bcca7eafbe813561a0b3ec3a07d38c Mon Sep 17 00:00:00 2001 From: Ferdinand Date: Tue, 31 Mar 2026 14:37:24 +0200 Subject: [PATCH] fix: use platform highscore key in snake --- snake.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snake.html b/snake.html index d2b7b42..a11d053 100644 --- a/snake.html +++ b/snake.html @@ -68,7 +68,7 @@ let snake, dir, nextDir, food, score, highscore, running, paused, animId; - highscore = parseInt(localStorage.getItem('snake_hs') || '0'); + highscore = getHighscore('snake'); highscoreEl.textContent = highscore; function init() { @@ -109,7 +109,6 @@ if (score > highscore) { highscore = score; highscoreEl.textContent = highscore; - localStorage.setItem('snake_hs', highscore); } spawnFood(); } else {