Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
88d8c26865
commit
163f261e15
@ -776,34 +776,10 @@ final class GameState: CasinoGameState {
|
||||
bankerCardsFaceUp[i] = true
|
||||
}
|
||||
|
||||
case .batch:
|
||||
// Reveal Top (Banker) then Bottom (Player)
|
||||
// We use sequential flips within the batch (1 after the other)
|
||||
try? await Task.sleep(for: flipDelay)
|
||||
|
||||
// Top Batch (Banker)
|
||||
for i in 0..<bankerCardsFaceUp.count {
|
||||
sound.playCardFlip()
|
||||
bankerCardsFaceUp[i] = true
|
||||
if i < bankerCardsFaceUp.count - 1 {
|
||||
try? await Task.sleep(for: shortDelay)
|
||||
}
|
||||
}
|
||||
|
||||
try? await Task.sleep(for: resultDelay)
|
||||
|
||||
// Bottom Batch (Player)
|
||||
for i in 0..<playerCardsFaceUp.count {
|
||||
sound.playCardFlip()
|
||||
playerCardsFaceUp[i] = true
|
||||
if i < playerCardsFaceUp.count - 1 {
|
||||
try? await Task.sleep(for: shortDelay)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pause to let user see initial totals
|
||||
if settings.revealStyle == .auto || settings.revealStyle == .batch {
|
||||
if settings.revealStyle == .auto {
|
||||
try? await Task.sleep(for: resultDelay)
|
||||
}
|
||||
} else {
|
||||
@ -842,7 +818,7 @@ final class GameState: CasinoGameState {
|
||||
sound.playCardFlip()
|
||||
playerCardsFaceUp[2] = true
|
||||
|
||||
if settings.revealStyle == .auto || settings.revealStyle == .batch {
|
||||
if settings.revealStyle == .auto {
|
||||
try? await Task.sleep(for: resultDelay)
|
||||
}
|
||||
} else {
|
||||
@ -864,7 +840,7 @@ final class GameState: CasinoGameState {
|
||||
sound.playCardFlip()
|
||||
bankerCardsFaceUp[2] = true
|
||||
|
||||
if settings.revealStyle == .auto || settings.revealStyle == .batch {
|
||||
if settings.revealStyle == .auto {
|
||||
try? await Task.sleep(for: resultDelay)
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -35,38 +35,34 @@ enum DeckCount: Int, CaseIterable, Identifiable {
|
||||
}
|
||||
|
||||
/// The style used to reveal cards.
|
||||
enum RevealStyle: String, CaseIterable, Identifiable {
|
||||
case auto // Sequential automatic (current)
|
||||
case batch // Player batch then Banker batch
|
||||
case tap // Sequential tap-to-reveal
|
||||
case squeeze // Gestural squeeze/peel
|
||||
enum RevealStyle: String, CaseIterable, Codable, Identifiable {
|
||||
case auto // Automatically reveal (original behavior)
|
||||
case tap // Tap each card to reveal
|
||||
case squeeze // Tap + Hold / Drag for pressure-based reveal
|
||||
|
||||
var id: String { rawValue }
|
||||
var id: String { rawValue } // Keep Identifiable conformance for SwiftUI
|
||||
|
||||
var displayName: String {
|
||||
switch self {
|
||||
case .auto: return String(localized: "Auto-Flip")
|
||||
case .batch: return String(localized: "Batch Reveal")
|
||||
case .tap: return String(localized: "Tap-to-Reveal")
|
||||
case .squeeze: return String(localized: "Squeeze/Peel")
|
||||
case .auto: return String(localized: "Auto Reveal")
|
||||
case .tap: return String(localized: "Tap Reveal")
|
||||
case .squeeze: return String(localized: "Squeeze Reveal")
|
||||
}
|
||||
}
|
||||
|
||||
var description: String {
|
||||
var helpText: String {
|
||||
switch self {
|
||||
case .auto: return String(localized: "Classic sequential reveal")
|
||||
case .batch: return String(localized: "Top position cards together, then Bottom")
|
||||
case .tap: return String(localized: "Tap each card to reveal it")
|
||||
case .squeeze: return String(localized: "The authentic high-stakes ritual")
|
||||
case .auto: return String(localized: "Cards flip automatically")
|
||||
case .tap: return String(localized: "Tap each card to reveal")
|
||||
case .squeeze: return String(localized: "Squeeze card to peek at value")
|
||||
}
|
||||
}
|
||||
|
||||
var icon: String {
|
||||
var iconName: String {
|
||||
switch self {
|
||||
case .auto: return "play.circle"
|
||||
case .batch: return "square.grid.2x2"
|
||||
case .tap: return "hand.tap"
|
||||
case .squeeze: return "hand.draw"
|
||||
case .auto: return "bolt.fill"
|
||||
case .tap: return "hand.tap.fill"
|
||||
case .squeeze: return "hand.point.up.left.and.text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -723,8 +723,8 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Auto-Flip" : {
|
||||
"comment" : "Name of the card reveal style that reveals cards one by one automatically.",
|
||||
"Auto Reveal" : {
|
||||
"comment" : "Name of the \"Auto Reveal\" card reveal style.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Avoid the Tie bet — 14.4% house edge!" : {
|
||||
@ -1162,9 +1162,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Batch Reveal" : {
|
||||
|
||||
},
|
||||
"Bet on Player, Banker, or Tie" : {
|
||||
"comment" : "Welcome screen feature title for betting options.",
|
||||
@ -1443,6 +1440,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Cards flip automatically" : {
|
||||
"comment" : "Help text for the \"Auto Reveal\" reveal style.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Change table limits and display options" : {
|
||||
"comment" : "Welcome screen feature description for customizing settings.",
|
||||
"localizations" : {
|
||||
@ -1535,10 +1536,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Classic sequential reveal" : {
|
||||
"comment" : "Description of the \"Auto-Flip\" reveal method.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Clear" : {
|
||||
"comment" : "The label of a button that clears all current bets in the game.",
|
||||
"localizations" : {
|
||||
@ -4237,8 +4234,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Squeeze/Peel" : {
|
||||
"comment" : "Description of the \"Squeeze/Peel\" reveal style.",
|
||||
"Squeeze card to peek at value" : {
|
||||
"comment" : "Help text for the \"Squeeze Reveal\" card reveal style.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Squeeze Reveal" : {
|
||||
"comment" : "Name of the reveal style option that uses pressure-based card peeking.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"STARTING BALANCE" : {
|
||||
@ -4474,16 +4475,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tap each card to reveal it" : {
|
||||
"comment" : "Text describing how to reveal cards in the \"Tap-to-Reveal\" reveal style.",
|
||||
"Tap each card to reveal" : {
|
||||
"comment" : "Help text for the \"Tap Reveal\" reveal style.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Tap-to-Reveal" : {
|
||||
"comment" : "Name of the card reveal style where players tap each card to reveal it.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"The authentic high-stakes ritual" : {
|
||||
"comment" : "Description of the \"Squeeze/Peel\" reveal style.",
|
||||
"Tap Reveal" : {
|
||||
"comment" : "Name of the icon representing the \"Tap Reveal\" card reveal style.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"The hand closest to 9 wins" : {
|
||||
@ -4830,10 +4827,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Top position cards together, then Bottom" : {
|
||||
"comment" : "Description of the \"Batch Reveal\" reveal style.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"Total game time" : {
|
||||
"comment" : "Rows in the \"Game stats\" section of the statistics sheet, showing various statistics about a Baccarat session.",
|
||||
"localizations" : {
|
||||
|
||||
@ -464,7 +464,7 @@ struct RevealStylePicker: View {
|
||||
ForEach(RevealStyle.allCases) { style in
|
||||
SelectableRow(
|
||||
title: style.displayName,
|
||||
subtitle: style.description,
|
||||
subtitle: style.helpText,
|
||||
isSelected: selection == style,
|
||||
accentColor: accentColor,
|
||||
action: { selection = style }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user