30 lines
570 B
Swift
30 lines
570 B
Swift
import Foundation
|
|
import WebSocketKit
|
|
|
|
final class DealingPlayer: CardHoldingPlayer {
|
|
|
|
var didDecide = false
|
|
|
|
override var actions: [PlayerAction] {
|
|
didDecide ? [] : [.initialDoubleCost, .noDoubleCost]
|
|
}
|
|
|
|
init(player: WaitingPlayer) {
|
|
super.init(player: player)
|
|
}
|
|
|
|
override var states: [PlayerState] {
|
|
var states = super.states
|
|
if !didDecide {
|
|
states.append(.canDouble)
|
|
}
|
|
return states
|
|
}
|
|
|
|
override var isNextActor: Bool {
|
|
get { !didDecide }
|
|
set { }
|
|
}
|
|
|
|
}
|