Add desktop games, robot pet and TCG app

This commit is contained in:
SirBlob committed 2026-11-01 18:42:28 -05:00
1 parent 812503251b
commit c664f573b8
55 files changed
+5090 -15

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
function storageKey(gameName: string): string {
return `${gameName}-high-score`;
}
export function loadHighScore(gameName: string): number {
try {
return Number(localStorage.getItem(storageKey(gameName))) || 0;
} catch {
return 0;
}
}
export function saveHighScore(gameName: string, score: number) {
try {
localStorage.setItem(storageKey(gameName), String(score));
} catch {
return;
}
}