Add game summary on client side
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
|
||||
struct GameStatistics: Codable, Equatable {
|
||||
struct GameSummary: Codable, Equatable {
|
||||
|
||||
let leader: PlayerName
|
||||
|
||||
@ -27,6 +27,7 @@ struct GameStatistics: Codable, Equatable {
|
||||
self.didWin = table.winners.contains(player: leader.name)
|
||||
self.cost = table.game.basicCost
|
||||
// TODO: Calculate cost correctly
|
||||
self.text = language.gameSummarizer.init(game: self).text
|
||||
}
|
||||
|
||||
}
|
@ -26,7 +26,7 @@ struct TableInfo: Codable {
|
||||
|
||||
var game: GameId? = nil
|
||||
|
||||
var gameStats: GameStatistics?
|
||||
var summary: GameSummary?
|
||||
|
||||
init(id: TableId, name: TableName) {
|
||||
self.id = id
|
||||
|
Reference in New Issue
Block a user