snapshot_poker_uiux_cleanup
This commit is contained in:
+22
-3
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user