fix(settings/user/snake): high score bug and achievement unlocking
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m59s

This commit is contained in:
2026-02-28 18:06:27 +01:00
parent 3e53f6e45c
commit f943de05cd

View File

@@ -204,13 +204,13 @@ const randomFoodPos = (): THREE.Vector2 => {
};
const eat = () => {
highScore.value = Math.max(highScore.value, score);
food.copy(randomFoodPos());
score += 1;
highScore.value = Math.max(highScore.value, score);
atlas.audio.duplicate.play(0.35);
if (score === 40) {
if (score >= 25) {
achievements.unlock("snake_score_25");
}
};