Schafkopf-Server/Sources/App/Model/PlayerAction.swift

33 lines
896 B
Swift
Raw Normal View History

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-09 11:10:20 +01:00
/// The player doubles on the initial four cards
case initialDoubleCost = "double"
2021-12-09 11:10:20 +01:00
/// The player does not double on the initial four cards
case noDoubleCost = "skip"
2021-12-09 11:10:20 +01:00
/// The player offers a wedding (one trump card)
case offerWedding = "wedding"
2021-12-09 11:10:20 +01:00
/// The player can choose to accept the wedding
case acceptWedding = "accept"
2021-12-09 11:10:20 +01:00
/// The player matches or increases the game during auction
case increaseOrMatchGame = "bid"
2021-12-09 11:10:20 +01:00
/// The player does not want to play
case withdrawFromAuction = "out"
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
}
}