qbreader / website

A text-based quizbowl packet reader with support for both single- and multi-player.
https://www.qbreader.org
MIT License
39 stars 20 forks source link

Question sometimes reveals answer when skips are enabled #295

Closed justinkeung1018 closed 5 months ago

justinkeung1018 commented 5 months ago

image As seen in the screenshot, the answer and the whole question reveal themselves while it is supposed to still be reading "... bitten in the eye in the process of...". This happens sporadically when skips are enabled.

BolunThompson commented 5 months ago

With thanks to a member of my QB team, here's a more detailed description of the issue:

There's a timer on the side that starts counting down whenever you buzz in for a question. Once the timer runs out, it reveals whatever question you're on. If you answer & skip before the timer runs out, then instead of resetting it just reveals the next question. To avoid this you have to wait until the timer runs out before skipping to the next question. If you wait for the timer to run out after answering, it inevitably marks your answer as wrong once it reaches 0.

On my iPhone, the timer is only open when the options are open.

before after

PSlape2 commented 5 months ago

I believe the error is that the timer on line 426 of tossups.js is not being ended when the player buzzes, so if the player moves to the next question before the timer ends, it continues running and preemptively ends the next question.

Timer: https://github.com/qbreader/website/blob/00171fb287fd95ef0cc13050b6108fe189964913/client/singleplayer/tossups.js#L426