Skip to content

🐛 [Bug]: Simon Says game logic fails to advance to next round upon correct user input; timer fails to clear #707

@Shashank-8p

Description

@Shashank-8p
Image

📝 Description

There is a logic breakdown in the game loop state management within the "Simon Says" utility. When a user successfully selects the correct action button matching a valid "Simon says [Action]" command, the application correctly increments the user's score. However, the game fails to dispatch the logic to clear the current timer interval, generate the next command, and reset the UI for the subsequent round. Consequently, the user is left stuck on the current command while the progress bar/timer continues to deplete until it forces a "Game Over" or timeout state.

🔄 Steps to Reproduce

  1. Open the "Simon Says" utility.
  2. Click "Start Game".
  3. Wait for a valid command (e.g., "Simon says Jump").
  4. Click the corresponding action button (e.g., "Jump") before the progress bar depletes.
  5. Observe the Score pill increment.
  6. See error: The command does not update to a new prompt, and the progress bar continues to drain as if the user has not yet interacted with the active turn.

🎯 Expected Behavior

Upon a successful and valid interaction, the component should immediately clear the active setTimeout or setInterval controlling the progress bar. It should then advance the game state by generating a new command (either with or without the "Simon says" prefix) and reset the progress bar UI to full for the new round.

❌ Actual Behavior / Error Logs

The application state registers the point but fails to invoke the nextRound() logic, leaving the active timer running on a completed turn.

💻 Environment

  • OS: Windows 11
  • Browser: Chrome / Brave
  • File Name: Simon Says Component / Game Loop Logic

  • I am a registered GSSoC 2026 contributor.
  • I want to be assigned to fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions