From e54a03e1329bd4711203ec8d49afcc1b095796af Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 3 Jun 2026 19:23:33 -0700
Subject: obfuscate solution in local storage, fix progress persistence

---
 src/components/Game/index.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/components/Game/index.tsx')

diff --git a/src/components/Game/index.tsx b/src/components/Game/index.tsx
index 3b45329..cde682d 100644
--- a/src/components/Game/index.tsx
+++ b/src/components/Game/index.tsx
@@ -44,8 +44,9 @@ export function Game({
   onPlayAgain,
 }: Props) {
   const [sessionDate] = React.useState(() => getUtcDate());
-  const isGameOver = didGuess || currentTry === 6;
   const recentFinishedPlay = localStorage.getItem("recentFinishedPlay");
+  const hasFinishedCurrentRound = didGuess || currentTry >= guesses.length;
+  const isGameOver = hasFinishedCurrentRound;
   const isBlocked =
     mode === "daily" &&
     !!recentFinishedPlay &&
@@ -53,10 +54,11 @@ export function Game({
     !checkDailyIsGenerated();
 
   React.useEffect(() => {
-    if (!isGameOver) return;
+    if (mode !== "daily") return;
+    if (!hasFinishedCurrentRound) return;
 
     localStorage.setItem("recentFinishedPlay", sessionDate);
-  }, [isGameOver, sessionDate]);
+  }, [mode, hasFinishedCurrentRound, sessionDate]);
 
   if (isBlocked) {
     return <h1>Daily MIXX is not available yet. Check back soon!</h1>;
-- 
cgit v1.2.3

