mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 04:56:15 -04:00
Looping works, almost
This commit is contained in:
parent
46f87556e1
commit
3d5547e786
12 changed files with 1116 additions and 918 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue