From 9d77c4b19c2e55f19373f5a71a1f5e7d83326ca5 Mon Sep 17 00:00:00 2001 From: Ben Kyd Date: Sun, 9 May 2021 19:39:29 +0100 Subject: [PATCH] update that UI --- client/public/scrabble/game.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/client/public/scrabble/game.js b/client/public/scrabble/game.js index 88da4a9..1ad1374 100644 --- a/client/public/scrabble/game.js +++ b/client/public/scrabble/game.js @@ -79,12 +79,22 @@ function initGame(boardstates, tileset, myplayer, players) function startMyTurn() { - + for (const user in Users) + { + if (Users[user].me) Users[user].turn = true; + else Users[user].turn = false; + } + updateUsersUI(Users); } function startOthersTurn(useruid) { - + for (const user in Users) + { + if (Users[user].uid === useruid) Users[user].turn = true; + else Users[user].turn = false; + } + updateUsersUI(Users); } function playMyTurn(stagedpieces)