Fix cost for wedding
This commit is contained in:
parent
cfba0fe467
commit
dbac55e15d
@ -61,6 +61,9 @@ struct EnglishGameSummarizer: GameSummarizer {
|
|||||||
var components = [String]()
|
var components = [String]()
|
||||||
components.append("Game \(table.game.basicCost)")
|
components.append("Game \(table.game.basicCost)")
|
||||||
if !table.isBettel {
|
if !table.isBettel {
|
||||||
|
if table.isHochzeit {
|
||||||
|
components.append("wedding")
|
||||||
|
}
|
||||||
if table.isSchwarz {
|
if table.isSchwarz {
|
||||||
components.append("Schwarz")
|
components.append("Schwarz")
|
||||||
} else if table.isSchneider {
|
} else if table.isSchneider {
|
||||||
|
@ -61,6 +61,9 @@ struct GermanGameSummarizer: GameSummarizer {
|
|||||||
var components = [String]()
|
var components = [String]()
|
||||||
components.append("Grundspiel \(table.game.basicCost)")
|
components.append("Grundspiel \(table.game.basicCost)")
|
||||||
if !table.isBettel {
|
if !table.isBettel {
|
||||||
|
if table.isHochzeit {
|
||||||
|
components.append("Hochzeit")
|
||||||
|
}
|
||||||
if table.isSchwarz {
|
if table.isSchwarz {
|
||||||
components.append("Schwarz")
|
components.append("Schwarz")
|
||||||
} else if table.isSchneider {
|
} else if table.isSchneider {
|
||||||
|
@ -19,6 +19,10 @@ final class FinishedTable: AbstractTable<FinishedPlayer> {
|
|||||||
cost += 5
|
cost += 5
|
||||||
}
|
}
|
||||||
cost += 5 * leadingTrumps
|
cost += 5 * leadingTrumps
|
||||||
|
guard game != .hochzeit else {
|
||||||
|
// Wedding is doubled
|
||||||
|
return cost * 2^^(totalNumberOfDoubles + 1)
|
||||||
|
}
|
||||||
return cost * 2^^totalNumberOfDoubles
|
return cost * 2^^totalNumberOfDoubles
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,6 +50,10 @@ final class FinishedTable: AbstractTable<FinishedPlayer> {
|
|||||||
game == .bettel
|
game == .bettel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var isHochzeit: Bool {
|
||||||
|
game == .hochzeit
|
||||||
|
}
|
||||||
|
|
||||||
var isSchwarz: Bool {
|
var isSchwarz: Bool {
|
||||||
!isBettel && (selectorTeamPoints == 0 || selectorTeamPoints == 120)
|
!isBettel && (selectorTeamPoints == 0 || selectorTeamPoints == 120)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user