Refine guessing game logic

Update the guessing game to handle user-provided questions and optimize computer-generated questions. The game will now grey out numbers divisible by 10 based on user input. Additionally, the computer will prioritize questions that maximize the remaining search space, ensuring a longer guessing period for the user. The "too high/too low" feedback is removed, relying solely on user questions for deduction.
This commit is contained in:
gpt-engineer-app[bot] 2025-08-10 14:11:36 +00:00
parent b0595d1cc7
commit 62c6acc388
2 changed files with 77 additions and 27 deletions

View file

@ -475,7 +475,6 @@ const GuessingGame: React.FC<GuessingGameProps> = ({ showSocialShare = true }) =
{gameState === 'playing' && gameMode === 'user-guesses' && userGuessingMode === 'questions' && (
<QuestionGuessingMode
maxRange={maxRange}
secretNumber={secretNumber!}
guesses={guesses}
feedback={feedback}
validNumbers={validNumbers}
@ -483,6 +482,7 @@ const GuessingGame: React.FC<GuessingGameProps> = ({ showSocialShare = true }) =
setUserGuess={setUserGuess}
onGuess={handleGuess}
onUpdateValidNumbers={setValidNumbers}
onWin={() => setGameState('won')}
/>
)}