Skip to content

Commit

Permalink
fix: fix NaN in highscore computation
Browse files Browse the repository at this point in the history
  • Loading branch information
dhmmasson committed Oct 10, 2024
1 parent 19c1802 commit 6dcc32b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function displayMenu() {
textAlign(CENTER, TOP);
fill(colors["Vanilla"]);
text(
"Higscore " + Game.highscores.reduce(max, 0),
"Higscore " + Game.highscores.reduce((a, e) => max(a, e), 0),
Game.board.size.width / 2,
10
);
Expand Down

0 comments on commit 6dcc32b

Please sign in to comment.