Clean up code

This commit is contained in:
Christoph Hagen 2021-12-26 16:38:16 +01:00
parent f10c3dc8c9
commit c0bd0110da
2 changed files with 1 additions and 12 deletions

View File

@ -293,21 +293,13 @@ function setInfoForPlayer(player, position, game) {
const layer = player.position
setTableCard(position, card, layer)
setTablePlayerName(position, player.name, player.active)
// if (!player.connected) {
// showPlayerDisconnected(position)
// return
// }
var state = player.state
if (game != null && state.indexOf("selects") > -1) {
const i = state.indexOf("selects")
state[i] = game
}
// const double = doubleText(player.doubles)
// if (double) {
// state.push(double)
// }
const text = state.map(x => convertStateToString(x)).join("<br>")
showPlayerState(position, text)
}

View File

@ -22,8 +22,6 @@ struct PlayerInfo: Codable, Equatable {
/// The number of times the player doubled the game cost (initial double and raises)
var numberOfDoubles = 0
var leadsGame = false
var state: [PlayerStateId] = []
init(name: PlayerName) {
@ -39,7 +37,6 @@ struct PlayerInfo: Codable, Equatable {
case playedCard = "card"
case positionInTrick = "position"
case numberOfDoubles = "doubles"
case leadsGame = "leads"
case state = "state"
}
}