import Foundation struct TableInfo: Codable { let id: String let name: String var player: PlayerInfo = .init(name: "") var playerLeft: PlayerInfo? = nil var playerAcross: PlayerInfo? = nil var playerRight: PlayerInfo? = nil var playableGames: [GameId] = [] /// The cards in the hand of the player var cards: [CardInfo] = [] /// The action the player can perform var actions: [ActionId] = [] var playerSelectsGame = false var game: GameId? = nil var summary: GameSummary? init(id: TableId, name: TableName) { self.id = id self.name = name } } extension TableInfo { } extension TableInfo: Comparable { static func < (lhs: TableInfo, rhs: TableInfo) -> Bool { lhs.name < rhs.name } }