Compare commits

...

2 Commits

Author SHA1 Message Date
f943de05cd fix(settings/user/snake): high score bug and achievement unlocking
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m59s
2026-02-28 18:06:27 +01:00
3e53f6e45c chore: format 2026-02-27 20:36:26 +01:00
2 changed files with 2 additions and 3 deletions

View File

@@ -315,7 +315,6 @@ watch(
0px -1px 2px 2px #111; 0px -1px 2px 2px #111;
} }
.nds2d-screen { .nds2d-screen {
position: absolute; position: absolute;
width: 51.5%; width: 51.5%;

View File

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