Skip to content

Fix Otter Stop level drop blocked by wrong-streak reset on correct go responses#81

Merged
acrosman merged 3 commits intomainfrom
copilot/fix-otter-stop-level-reset
Apr 24, 2026
Merged

Fix Otter Stop level drop blocked by wrong-streak reset on correct go responses#81
acrosman merged 3 commits intomainfrom
copilot/fix-otter-stop-level-reset

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

After any wrong answer, forceGoNext inserts a guaranteed go trial. Because a correct go response was resetting consecutiveWrong to 0, false alarms could never accumulate to the 3-in-a-row threshold needed to drop the level — the forced go always cleared the streak first.

Changes

  • game.js: In the correct-go branch, preserve consecutiveWrong instead of zeroing it. This makes correct go responses neutral for both streak counters, matching the symmetric design already used for level advancement (only no-go inhibitions count toward the correct streak; only no-go inhibitions now reset the wrong streak).
// Before
staircaseState = { value: level, consecutiveCorrect, consecutiveWrong: 0 };

// After
staircaseState = { value: level, consecutiveCorrect, consecutiveWrong };
  • game.test.js: Updated the test asserting a correct go resets consecutiveWrong. Replaced the single "correct response resets wrong streak" staircase test with three targeted tests:
    • correct no-go inhibition resets the wrong streak
    • correct go response does not reset the wrong streak
    • 3 false alarms interspersed with correct forced-go responses correctly trigger a level drop

Copilot AI linked an issue Apr 24, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix Otter Stop not resetting after three wrong answers Fix Otter Stop level drop blocked by wrong-streak reset on correct go responses Apr 24, 2026
Copilot AI requested a review from acrosman April 24, 2026 01:02
@acrosman acrosman marked this pull request as ready for review April 24, 2026 01:15
@acrosman acrosman merged commit cb1bf6b into main Apr 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Otter Stop doesn't go back after 3 wrong answers

2 participants