From ef68545176268fd8e87631de0709b5124086efcd Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 24 Feb 2024 23:31:29 -0800 Subject: [PATCH] fairness for early timeouts wait one quantization period before sending early timeout --- app/components/prompt/prompt.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/prompt/prompt.tsx b/app/components/prompt/prompt.tsx index 196f2bf..478c0a9 100644 --- a/app/components/prompt/prompt.tsx +++ b/app/components/prompt/prompt.tsx @@ -9,6 +9,7 @@ import type { Action, Player } from "~/engine"; import { CANT_BUZZ_FLAG, CLUE_TIMEOUT_MS, + QUANTIZATION_FACTOR_MS, GameState, useEngineContext, } from "~/engine"; @@ -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); }