Add points to player info

This commit is contained in:
Christoph Hagen 2021-12-22 22:12:31 +01:00
parent 7ac0f29904
commit 86456b2441
2 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,8 @@
import Foundation
enum SupportedLanguage {
case german
case english
enum SupportedLanguage: String, Codable {
case german = "german"
case english = "english"
var gameSummarizer: GameSummarizer.Type {
switch self {

View File

@ -5,6 +5,8 @@ struct PlayerInfo: Codable, Equatable {
/// The name of the player
let name: PlayerName
var points = 0
/// Indicates that the player is active, i.e. a session is established
var isConnected = false
@ -31,6 +33,7 @@ struct PlayerInfo: Codable, Equatable {
/// Convert the property names into shorter strings for JSON encoding
enum CodingKeys: String, CodingKey {
case name = "name"
case points = "points"
case isConnected = "connected"
case isNextActor = "active"
case playedCard = "card"