Schafkopf-Server/Sources/App/Model/Players/PlayingPlayer.swift
2021-12-09 11:11:17 +01:00

31 lines
510 B
Swift

import Foundation
import WebSocketKit
final class PlayingPlayer: AbstractPlayer {
var playedCard: Card? = nil
var cards: [PlayableCard]
var leadsGame = false
var canStillRaise = true
init(player: BiddingPlayer) {
self.cards = player.cards
super.init(player: player)
}
}
extension PlayingPlayer: Player {
var actions: [PlayerAction] {
guard canStillRaise, !leadsGame else {
return []
}
return [.doubleDuringGame]
}
}