make it actually work this time
todo: 'you have a turn' text doesn't move chat
This commit is contained in:
parent
a0f3208686
commit
27a878b619
1 changed files with 3 additions and 2 deletions
|
@ -171,6 +171,7 @@ class CollabVMClient {
|
|||
buttons.takeTurn.innerText = "Take Turn";
|
||||
turn = -1;
|
||||
turnstatus.innerText = "";
|
||||
display.className = "";
|
||||
// Get the number of users queued for a turn
|
||||
var queuedUsers = Number(msgArr[2]);
|
||||
if (queuedUsers === 0) return;
|
||||
|
@ -182,7 +183,7 @@ class CollabVMClient {
|
|||
if (currentTurnUsername === window.username) {
|
||||
turn = 0;
|
||||
turnstatus.innerText = "You have the turn.";
|
||||
display.class = "focused";
|
||||
display.className = "focused";
|
||||
}
|
||||
// Highlight all waiting users and set their status
|
||||
if (queuedUsers > 1) {
|
||||
|
@ -190,7 +191,7 @@ class CollabVMClient {
|
|||
if (window.username === msgArr[i+3]) {
|
||||
turn = i;
|
||||
turnstatus.innerText = "Waiting for turn";
|
||||
display.class="waiting";
|
||||
display.className="waiting";
|
||||
};
|
||||
var user = users.find(u => u.username === msgArr[i+3]);
|
||||
user.turn = i;
|
||||
|
|
Loading…
Reference in a new issue