Show proper game summary
This commit is contained in:
@ -19,7 +19,7 @@ final class PlayingPlayer: CardHoldingPlayer {
|
||||
|
||||
var leadsGame: Bool
|
||||
|
||||
var numberOfDoubles = 0
|
||||
var numberOfRaises = 0
|
||||
|
||||
/// All tricks won by the player in this game
|
||||
var wonTricks: [Trick] = []
|
||||
@ -34,8 +34,13 @@ final class PlayingPlayer: CardHoldingPlayer {
|
||||
}
|
||||
}
|
||||
|
||||
/// The players has been called in a call game
|
||||
var isCallee: Bool {
|
||||
isCalledWithAce != nil
|
||||
}
|
||||
|
||||
private var isUnknownCallee: Bool {
|
||||
isCalledWithAce != nil && !didPlayCalledAce
|
||||
isCallee && !didPlayCalledAce
|
||||
}
|
||||
|
||||
override var actions: [PlayerAction] {
|
||||
@ -165,7 +170,7 @@ final class PlayingPlayer: CardHoldingPlayer {
|
||||
if leadsGame {
|
||||
states.append(.leadsGame)
|
||||
}
|
||||
if numberOfDoubles > 0 {
|
||||
if numberOfRaises > 0 {
|
||||
states.append(.didRaise)
|
||||
}
|
||||
return states
|
||||
|
Reference in New Issue
Block a user