Looping works, almost

This commit is contained in:
Renan LE CARO 2025-03-28 11:58:58 +01:00
parent 46f87556e1
commit 3d5547e786
12 changed files with 1116 additions and 918 deletions

View file

@ -143,12 +143,12 @@ export function gameOver(title: string, intro: string) {
export function getHistograms() {
let runStats = "";
// TODO separate adventure and normal runs
try {
// Stores only top 100 runs
let runsHistory = JSON.parse(
localStorage.getItem("breakout_71_runs_history") || "[]",
) as RunHistoryItem[];
runsHistory.sort((a, b) => a.score - b.score).reverse();
runsHistory = runsHistory.slice(0, 100);