From 6926a080f66e2bd2eb38665e9336dabbdc4c4dba Mon Sep 17 00:00:00 2001 From: Andre Padez Date: Thu, 30 Oct 2025 22:54:34 +0000 Subject: [PATCH] fix(phase1.4): fix score calculation - remove wrong decrement on level up - Remove the buggy 'newScore--' line that was penalizing level ups - Score now correctly accumulates: each food = (+1 * current_level) points - Level 1: 1 food = +1 point - Level 2: 1 food = +2 points - Level 3: 1 food = +3 points, etc. - No penalty on leveling up, just speed increase - Score calculation now makes intuitive sense --- src/useGameStatus/useGameStatus.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/useGameStatus/useGameStatus.ts b/src/useGameStatus/useGameStatus.ts index bf88939..fdaf939 100755 --- a/src/useGameStatus/useGameStatus.ts +++ b/src/useGameStatus/useGameStatus.ts @@ -92,7 +92,6 @@ export function useGameStatus( setScore((prev) => { let newScore = prev + levelRef.current; if (foodsEatenRef.current >= FOODS_PER_LEVEL) { - newScore--; const newLevel = levelRef.current + 1; levelRef.current = newLevel; setLevel(newLevel);