Skip to content

Commit

Permalink
fairness for early timeouts
Browse files Browse the repository at this point in the history
wait one quantization period before sending early timeout
  • Loading branch information
neilmovva committed Feb 25, 2024
1 parent 5c4c56c commit ef68545
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/prompt/prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { Action, Player } from "~/engine";
import {
CANT_BUZZ_FLAG,
CLUE_TIMEOUT_MS,
QUANTIZATION_FACTOR_MS,

Check failure on line 12 in app/components/prompt/prompt.tsx

View workflow job for this annotation

GitHub Actions / 🧪 Test

Module '"~/engine"' has no exported member 'QUANTIZATION_FACTOR_MS'.
GameState,
useEngineContext,
} from "~/engine";
Expand Down Expand Up @@ -402,7 +403,7 @@ function ReadCluePrompt({
if (
buzzUserId !== userId &&
buzz !== CANT_BUZZ_FLAG &&
buzz < deltaMs
(buzz + QUANTIZATION_FACTOR_MS) < deltaMs
) {
submitBuzz(CLUE_TIMEOUT_MS + 1);
}
Expand Down

0 comments on commit ef68545

Please sign in to comment.