Clean up code
This commit is contained in:
parent
f10c3dc8c9
commit
c0bd0110da
@ -293,21 +293,13 @@ function setInfoForPlayer(player, position, game) {
|
|||||||
const layer = player.position
|
const layer = player.position
|
||||||
setTableCard(position, card, layer)
|
setTableCard(position, card, layer)
|
||||||
setTablePlayerName(position, player.name, player.active)
|
setTablePlayerName(position, player.name, player.active)
|
||||||
// if (!player.connected) {
|
|
||||||
// showPlayerDisconnected(position)
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
var state = player.state
|
var state = player.state
|
||||||
if (game != null && state.indexOf("selects") > -1) {
|
if (game != null && state.indexOf("selects") > -1) {
|
||||||
const i = state.indexOf("selects")
|
const i = state.indexOf("selects")
|
||||||
state[i] = game
|
state[i] = game
|
||||||
}
|
}
|
||||||
|
|
||||||
// const double = doubleText(player.doubles)
|
|
||||||
// if (double) {
|
|
||||||
// state.push(double)
|
|
||||||
// }
|
|
||||||
|
|
||||||
const text = state.map(x => convertStateToString(x)).join("<br>")
|
const text = state.map(x => convertStateToString(x)).join("<br>")
|
||||||
showPlayerState(position, text)
|
showPlayerState(position, text)
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,6 @@ struct PlayerInfo: Codable, Equatable {
|
|||||||
/// The number of times the player doubled the game cost (initial double and raises)
|
/// The number of times the player doubled the game cost (initial double and raises)
|
||||||
var numberOfDoubles = 0
|
var numberOfDoubles = 0
|
||||||
|
|
||||||
var leadsGame = false
|
|
||||||
|
|
||||||
var state: [PlayerStateId] = []
|
var state: [PlayerStateId] = []
|
||||||
|
|
||||||
init(name: PlayerName) {
|
init(name: PlayerName) {
|
||||||
@ -39,7 +37,6 @@ struct PlayerInfo: Codable, Equatable {
|
|||||||
case playedCard = "card"
|
case playedCard = "card"
|
||||||
case positionInTrick = "position"
|
case positionInTrick = "position"
|
||||||
case numberOfDoubles = "doubles"
|
case numberOfDoubles = "doubles"
|
||||||
case leadsGame = "leads"
|
|
||||||
case state = "state"
|
case state = "state"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user