From 3e85c01809c62943068e2ea49081d243adda0633 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Thu, 9 Dec 2021 11:11:42 +0100 Subject: [PATCH] Update client side info parsing --- Public/elements.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Public/elements.js b/Public/elements.js index d614fc3..e57de05 100644 --- a/Public/elements.js +++ b/Public/elements.js @@ -197,9 +197,9 @@ function setCard(id, card, layer) { function updateTableInfo(table) { showTableName(table.name) // Set own cards - const cardCount = table.player.cards.length + const cardCount = table.cards.length for (let i = 0; i < cardCount; i += 1) { - const card = table.player.cards[i] + const card = table.cards[i] setHandCard(i+1, card.card, card.playable) } for (let i = cardCount; i < 8; i += 1) { @@ -209,7 +209,7 @@ function updateTableInfo(table) { // Show player info console.log(table) setInfoForPlayer(table.player, "bottom") - if (table.player.selectsGame) { + if (table.playerSelectsGame) { setActionsForOwnPlayer(table.playableGames) showAvailableGames([]) } else { @@ -218,7 +218,7 @@ function updateTableInfo(table) { } else { showAvailableGames([]) } - setActionsForOwnPlayer(table.player.actions) + setActionsForOwnPlayer(table.actions) } if (table.hasOwnProperty("playerLeft")) { setInfoForPlayer(table.playerLeft, "left")