23 lines
332 B
Swift
23 lines
332 B
Swift
|
import Foundation
|
||
|
import WebSocketKit
|
||
|
|
||
|
final class WaitingPlayer: AbstractPlayer {
|
||
|
|
||
|
var canStartGame: Bool = false
|
||
|
}
|
||
|
|
||
|
extension WaitingPlayer: Player {
|
||
|
|
||
|
var actions: [PlayerAction] {
|
||
|
canStartGame ? [.deal] : []
|
||
|
}
|
||
|
|
||
|
var cards: [PlayableCard] {
|
||
|
[]
|
||
|
}
|
||
|
|
||
|
var playedCard: Card? {
|
||
|
nil
|
||
|
}
|
||
|
}
|