From 9af6fc6e93d59e72da2d80eb63b3a9a9ce445fb8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 9 Dec 2023 17:20:25 +0100 Subject: Color invite-only games gold when all invites are accepted. --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index f389fbd..2910e36 100644 --- a/server.js +++ b/server.js @@ -1435,7 +1435,7 @@ function annotate_game_info(game, user_id, unread) { if (p.user_id === user_id) { your_role = p.role your_count++ - if ((p_is_active || p_is_owner) && game.is_ready) + if (p_is_active && game.is_ready) game.your_turn = true if (p.is_invite) game.your_turn = true @@ -1460,6 +1460,9 @@ function annotate_game_info(game, user_id, unread) { game.result = `${link} (${game.result})` } + if (game.status === STATUS_OPEN && game.is_ready && game.owner_id === user_id) + game.your_turn = true + if (your_count > 0) { game.is_yours = true if (your_count === 1) -- cgit v1.2.3