games: the clock beats the walk button, and the rack isn't betting
The trivia ladder handled a walk before it looked at the clock, so the timeout only ever bit if the browser volunteered it. Sit on a question, look it up, answer if you find it and walk if you don't, and you never lose a ladder. The clock is now the first thing that happens to a move. The house's chip rack was wired up as bet buttons on blackjack and hangman: it's four spans with data-chip on them and nothing said the handler only wanted the real ones. Clicking the house's money raised your bet. Hangman had two definitions of "a letter you'd guess" — unicode in the engine, ASCII in the renderer — and a phrase with an accent in it would have had no tile to fill and no key to fill it with. One definition now. Plus: trivia's countdown no longer freezes at zero when the server turns down a timeout report it was early for, questions whose wrong answer decodes into the right one are dropped at the door, and hangman bets on PeteFX's spot like every other table instead of its own copy of it.
This commit is contained in:
@@ -127,7 +127,12 @@
|
||||
// and the server (which has been holding the real clock all along) agreeing.
|
||||
function timeUp() {
|
||||
stopClock();
|
||||
if (timedOut || busy || !game || game.phase !== "playing") return;
|
||||
if (timedOut || !game || game.phase !== "playing") return;
|
||||
// A move is already in flight. Come back rather than give up: this fires when
|
||||
// the server has rejected our last timeout report (its clock hadn't run out
|
||||
// yet) and the refresh has re-armed a countdown that is already at zero. Give
|
||||
// up here and the clock sits frozen at 0.0s and the question never resolves.
|
||||
if (busy) { setTimeout(timeUp, 250); return; }
|
||||
timedOut = true;
|
||||
lockAnswers();
|
||||
setTimeout(function () {
|
||||
|
||||
Reference in New Issue
Block a user