Update client side info parsing
This commit is contained in:
parent
289458bfd8
commit
3e85c01809
@ -197,9 +197,9 @@ function setCard(id, card, layer) {
|
|||||||
function updateTableInfo(table) {
|
function updateTableInfo(table) {
|
||||||
showTableName(table.name)
|
showTableName(table.name)
|
||||||
// Set own cards
|
// Set own cards
|
||||||
const cardCount = table.player.cards.length
|
const cardCount = table.cards.length
|
||||||
for (let i = 0; i < cardCount; i += 1) {
|
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)
|
setHandCard(i+1, card.card, card.playable)
|
||||||
}
|
}
|
||||||
for (let i = cardCount; i < 8; i += 1) {
|
for (let i = cardCount; i < 8; i += 1) {
|
||||||
@ -209,7 +209,7 @@ function updateTableInfo(table) {
|
|||||||
// Show player info
|
// Show player info
|
||||||
console.log(table)
|
console.log(table)
|
||||||
setInfoForPlayer(table.player, "bottom")
|
setInfoForPlayer(table.player, "bottom")
|
||||||
if (table.player.selectsGame) {
|
if (table.playerSelectsGame) {
|
||||||
setActionsForOwnPlayer(table.playableGames)
|
setActionsForOwnPlayer(table.playableGames)
|
||||||
showAvailableGames([])
|
showAvailableGames([])
|
||||||
} else {
|
} else {
|
||||||
@ -218,7 +218,7 @@ function updateTableInfo(table) {
|
|||||||
} else {
|
} else {
|
||||||
showAvailableGames([])
|
showAvailableGames([])
|
||||||
}
|
}
|
||||||
setActionsForOwnPlayer(table.player.actions)
|
setActionsForOwnPlayer(table.actions)
|
||||||
}
|
}
|
||||||
if (table.hasOwnProperty("playerLeft")) {
|
if (table.hasOwnProperty("playerLeft")) {
|
||||||
setInfoForPlayer(table.playerLeft, "left")
|
setInfoForPlayer(table.playerLeft, "left")
|
||||||
|
Loading…
Reference in New Issue
Block a user