2021-12-06 18:28:35 +01:00
|
|
|
import Foundation
|
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
enum PlayerAction: String, Codable {
|
|
|
|
/// The player can request cards to be dealt
|
|
|
|
case deal = "deal"
|
2021-12-06 18:28:35 +01:00
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
/// The player doubles on the initial four cards
|
|
|
|
case initialDoubleCost = "double"
|
2021-12-06 18:28:35 +01:00
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
/// The player does not double on the initial four cards
|
|
|
|
case noDoubleCost = "skip"
|
2021-12-06 18:28:35 +01:00
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
/// The player offers a wedding (one trump card)
|
|
|
|
case offerWedding = "wedding"
|
2021-12-06 18:28:35 +01:00
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
/// The player can choose to accept the wedding
|
|
|
|
case acceptWedding = "accept"
|
2021-12-06 18:28:35 +01:00
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
/// The player matches or increases the game during auction
|
|
|
|
case increaseOrMatchGame = "bid"
|
2021-12-06 18:28:35 +01:00
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
/// The player does not want to play
|
|
|
|
case withdrawFromAuction = "out"
|
2021-12-06 18:28:35 +01:00
|
|
|
|
2021-12-09 11:10:20 +01:00
|
|
|
/// The player claims to win and doubles the game cost ("schießen")
|
|
|
|
case doubleDuringGame = "raise"
|
|
|
|
|
|
|
|
/// The url path for the client to call (e.g. /player/deal)
|
|
|
|
var path: String {
|
|
|
|
rawValue
|
2021-12-06 18:28:35 +01:00
|
|
|
}
|
|
|
|
}
|