diff --git a/Sources/App/GameSummary/EnglishGameSummarizer.swift b/Sources/App/GameSummary/EnglishGameSummarizer.swift index 0aa0aaf..e532d76 100644 --- a/Sources/App/GameSummary/EnglishGameSummarizer.swift +++ b/Sources/App/GameSummary/EnglishGameSummarizer.swift @@ -61,6 +61,9 @@ struct EnglishGameSummarizer: GameSummarizer { var components = [String]() components.append("Game \(table.game.basicCost)") if !table.isBettel { + if table.isHochzeit { + components.append("wedding") + } if table.isSchwarz { components.append("Schwarz") } else if table.isSchneider { diff --git a/Sources/App/GameSummary/GermanGameSummarizer.swift b/Sources/App/GameSummary/GermanGameSummarizer.swift index 383e81c..19eb99f 100644 --- a/Sources/App/GameSummary/GermanGameSummarizer.swift +++ b/Sources/App/GameSummary/GermanGameSummarizer.swift @@ -61,6 +61,9 @@ struct GermanGameSummarizer: GameSummarizer { var components = [String]() components.append("Grundspiel \(table.game.basicCost)") if !table.isBettel { + if table.isHochzeit { + components.append("Hochzeit") + } if table.isSchwarz { components.append("Schwarz") } else if table.isSchneider { diff --git a/Sources/App/Model/Tables/FinishedTable.swift b/Sources/App/Model/Tables/FinishedTable.swift index 01b3b2a..05bd2bb 100644 --- a/Sources/App/Model/Tables/FinishedTable.swift +++ b/Sources/App/Model/Tables/FinishedTable.swift @@ -19,6 +19,10 @@ final class FinishedTable: AbstractTable { cost += 5 } cost += 5 * leadingTrumps + guard game != .hochzeit else { + // Wedding is doubled + return cost * 2^^(totalNumberOfDoubles + 1) + } return cost * 2^^totalNumberOfDoubles } @@ -46,6 +50,10 @@ final class FinishedTable: AbstractTable { game == .bettel } + var isHochzeit: Bool { + game == .hochzeit + } + var isSchwarz: Bool { !isBettel && (selectorTeamPoints == 0 || selectorTeamPoints == 120) }