Files
pokerfreak-shell/mac/Sources/CockpitKern/Regeln.swift
T

36 lines
3.6 KiB
Swift

import Foundation
// STUB fuer Rot
public enum Nachricht: Equatable, Sendable { case ansicht(Set<Bereich>), rueckmeldung(Rueckmeldung), unbekannt }
public struct Rueckmeldung: Equatable, Sendable { public var aktion: String?; public var ok: Bool; public var text: String; public var raum: String?; public var bild: String?
public init(aktion: String?, ok: Bool, text: String, raum: String?, bild: String?) { self.aktion = aktion; self.ok = ok; self.text = text; self.raum = raum; self.bild = bild } }
public struct Ansicht: Sendable { public var kopf: Kopf?; public var jetzt: Jetzt?; public var wachstum: Wachstum?; public var entscheidungen: Entscheidungen?; public var geld: Geld?; public var sitzen: Sitzen?; public var stil: Stil?; public var ticker: Ticker?; public var stand: Double?
public init() {}
public mutating func anwenden(_ text: String) -> Nachricht { .unbekannt } }
public struct ServerAdresse: Equatable, Sendable { public var port: Int
public init(port: Int) { self.port = port }
public init?(startzeile: String) { return nil }
public var http: URL { URL(string: "x:")! }; public var websocket: URL { http }; public var steuern: URL { http }
public func foto(_ pfad: String) -> URL? { nil } }
public enum EscFolge: Equatable, Sendable { case eigene, notAus, ruhe }
public enum EscRegel { public static func entscheiden(eigeneTasteAlter: Double?, laeuft: Bool?) -> EscFolge { .ruhe } }
public enum Ausweichen { public static func aktiv(dateiAlter: Double?) -> Bool { false } }
public enum Rahmen { public static func obenLinks(x: Double, y: Double, breite: Double, hoehe: Double, hauptHoehe: Double) -> [Int] { [] }
public static func datei(rect: [Int], zeit: Double) -> Data { Data("{}".utf8) } }
public struct Flaeche: Equatable, Sendable { public var x, y, breite, hoehe: Double
public init(x: Double, y: Double, breite: Double, hoehe: Double) { self.x = x; self.y = y; self.breite = breite; self.hoehe = hoehe } }
public enum Seite: String, Sendable { case links, rechts }
public enum Platzierung { public static let abstand = 12.0
public static func leiste(in s: Flaeche, seite: Seite, breite: Double) -> Flaeche { s }
public static func pille(in s: Flaeche, seite: Seite, breite: Double, hoehe: Double) -> Flaeche { s }
public static func naechsteSeite(mitteX: Double, in s: Flaeche) -> Seite { .rechts } }
public struct Countdown: Equatable, Sendable { public var rest: Double; public var anteil: Double
public init?(zug: Zug?, jetzt: Double) { return nil } }
public enum ErgebnisFilter: String, Sendable { case gewonnen, verloren, null, offen }
public struct EntscheidungsFilter: Sendable { public var aktion: String?; public var stake: String?; public var spielart: String?; public var ergebnis: ErgebnisFilter?; public var suche: String
public init(aktion: String? = nil, stake: String? = nil, spielart: String? = nil, ergebnis: ErgebnisFilter? = nil, suche: String = "") { self.aktion = aktion; self.stake = stake; self.spielart = spielart; self.ergebnis = ergebnis; self.suche = suche }
public func anwenden(_ z: [EntscheidungsZeile]) -> [EntscheidungsZeile] { [] } }
public enum Format { public static func roh(_ x: Double) -> String { "" }; public static func zahl(_ x: Double?, stellen: Int = 2) -> String { "" }; public static func auto(_ x: Double?) -> String { "" }
public static func prozent(_ x: Double?) -> String { "" }; public static func vorzeichen(_ x: Double?) -> String { "" } }
public enum Farbe: Sendable { case herz, karo, pik, kreuz }
public struct Karte: Equatable, Sendable { public var rang: String; public var farbe: Farbe; public init?(_ s: String) { return nil } }