snapshot_poker_uiux_cleanup

This commit is contained in:
DeSqBlocki
2026-09-08 20:51:58 +02:00
parent 136a5902c0
commit 82cef1b34a
5 changed files with 154 additions and 31 deletions
+22 -3
View File
@@ -30,16 +30,16 @@ const POKER_MAX_PLAYERS =
6;
const POKER_DEFAULT_SMALL_BLIND =
100;
10;
const POKER_DEFAULT_BIG_BLIND =
200;
20;
const POKER_DEFAULT_BUY_IN =
1000;
const POKER_TURN_TIMEOUT =
30;
90;
const POKER_LOBBY_TIMEOUT =
15 * 60;
@@ -492,6 +492,17 @@ function syncCompletedHand(
game.data.turnExpiresAt =
null;
/*
* A completed hand starts a fresh between-hand lobby
* window. Do not inherit the original table-creation
* expiry, otherwise a healthy table can close shortly
* after a long hand finishes.
*/
game.data.lobbyExpiresAt =
now +
POKER_LOBBY_TIMEOUT;
return true;
}
@@ -1707,6 +1718,14 @@ function createPokerService({
nextGame.data.handCompletedAt =
null;
/*
* Lobby expiry only applies while waiting between
* hands. Active hands are governed by turn timers.
*/
nextGame.data.lobbyExpiresAt =
null;
applyTurnDeadline(
nextGame,
now(),