Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2026-01-21 15:59:31 -06:00
parent 88d8c26865
commit 163f261e15
4 changed files with 36 additions and 71 deletions

View File

@ -776,34 +776,10 @@ final class GameState: CasinoGameState {
bankerCardsFaceUp[i] = true 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 // Pause to let user see initial totals
if settings.revealStyle == .auto || settings.revealStyle == .batch { if settings.revealStyle == .auto {
try? await Task.sleep(for: resultDelay) try? await Task.sleep(for: resultDelay)
} }
} else { } else {
@ -842,7 +818,7 @@ final class GameState: CasinoGameState {
sound.playCardFlip() sound.playCardFlip()
playerCardsFaceUp[2] = true playerCardsFaceUp[2] = true
if settings.revealStyle == .auto || settings.revealStyle == .batch { if settings.revealStyle == .auto {
try? await Task.sleep(for: resultDelay) try? await Task.sleep(for: resultDelay)
} }
} else { } else {
@ -864,7 +840,7 @@ final class GameState: CasinoGameState {
sound.playCardFlip() sound.playCardFlip()
bankerCardsFaceUp[2] = true bankerCardsFaceUp[2] = true
if settings.revealStyle == .auto || settings.revealStyle == .batch { if settings.revealStyle == .auto {
try? await Task.sleep(for: resultDelay) try? await Task.sleep(for: resultDelay)
} }
} else { } else {

View File

@ -35,38 +35,34 @@ enum DeckCount: Int, CaseIterable, Identifiable {
} }
/// The style used to reveal cards. /// The style used to reveal cards.
enum RevealStyle: String, CaseIterable, Identifiable { enum RevealStyle: String, CaseIterable, Codable, Identifiable {
case auto // Sequential automatic (current) case auto // Automatically reveal (original behavior)
case batch // Player batch then Banker batch case tap // Tap each card to reveal
case tap // Sequential tap-to-reveal case squeeze // Tap + Hold / Drag for pressure-based reveal
case squeeze // Gestural squeeze/peel
var id: String { rawValue } var id: String { rawValue } // Keep Identifiable conformance for SwiftUI
var displayName: String { var displayName: String {
switch self { switch self {
case .auto: return String(localized: "Auto-Flip") case .auto: return String(localized: "Auto Reveal")
case .batch: return String(localized: "Batch Reveal") case .tap: return String(localized: "Tap Reveal")
case .tap: return String(localized: "Tap-to-Reveal") case .squeeze: return String(localized: "Squeeze Reveal")
case .squeeze: return String(localized: "Squeeze/Peel")
} }
} }
var description: String { var helpText: String {
switch self { switch self {
case .auto: return String(localized: "Classic sequential reveal") case .auto: return String(localized: "Cards flip automatically")
case .batch: return String(localized: "Top position cards together, then Bottom") case .tap: return String(localized: "Tap each card to reveal")
case .tap: return String(localized: "Tap each card to reveal it") case .squeeze: return String(localized: "Squeeze card to peek at value")
case .squeeze: return String(localized: "The authentic high-stakes ritual")
} }
} }
var icon: String { var iconName: String {
switch self { switch self {
case .auto: return "play.circle" case .auto: return "bolt.fill"
case .batch: return "square.grid.2x2" case .tap: return "hand.tap.fill"
case .tap: return "hand.tap" case .squeeze: return "hand.point.up.left.and.text"
case .squeeze: return "hand.draw"
} }
} }
} }

View File

@ -723,8 +723,8 @@
} }
} }
}, },
"Auto-Flip" : { "Auto Reveal" : {
"comment" : "Name of the card reveal style that reveals cards one by one automatically.", "comment" : "Name of the \"Auto Reveal\" card reveal style.",
"isCommentAutoGenerated" : true "isCommentAutoGenerated" : true
}, },
"Avoid the Tie bet — 14.4% house edge!" : { "Avoid the Tie bet — 14.4% house edge!" : {
@ -1162,9 +1162,6 @@
} }
} }
} }
},
"Batch Reveal" : {
}, },
"Bet on Player, Banker, or Tie" : { "Bet on Player, Banker, or Tie" : {
"comment" : "Welcome screen feature title for betting options.", "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" : { "Change table limits and display options" : {
"comment" : "Welcome screen feature description for customizing settings.", "comment" : "Welcome screen feature description for customizing settings.",
"localizations" : { "localizations" : {
@ -1535,10 +1536,6 @@
} }
} }
}, },
"Classic sequential reveal" : {
"comment" : "Description of the \"Auto-Flip\" reveal method.",
"isCommentAutoGenerated" : true
},
"Clear" : { "Clear" : {
"comment" : "The label of a button that clears all current bets in the game.", "comment" : "The label of a button that clears all current bets in the game.",
"localizations" : { "localizations" : {
@ -4237,8 +4234,12 @@
} }
} }
}, },
"Squeeze/Peel" : { "Squeeze card to peek at value" : {
"comment" : "Description of the \"Squeeze/Peel\" reveal style.", "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 "isCommentAutoGenerated" : true
}, },
"STARTING BALANCE" : { "STARTING BALANCE" : {
@ -4474,16 +4475,12 @@
} }
} }
}, },
"Tap each card to reveal it" : { "Tap each card to reveal" : {
"comment" : "Text describing how to reveal cards in the \"Tap-to-Reveal\" reveal style.", "comment" : "Help text for the \"Tap Reveal\" reveal style.",
"isCommentAutoGenerated" : true "isCommentAutoGenerated" : true
}, },
"Tap-to-Reveal" : { "Tap Reveal" : {
"comment" : "Name of the card reveal style where players tap each card to reveal it.", "comment" : "Name of the icon representing the \"Tap Reveal\" card reveal style.",
"isCommentAutoGenerated" : true
},
"The authentic high-stakes ritual" : {
"comment" : "Description of the \"Squeeze/Peel\" reveal style.",
"isCommentAutoGenerated" : true "isCommentAutoGenerated" : true
}, },
"The hand closest to 9 wins" : { "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" : { "Total game time" : {
"comment" : "Rows in the \"Game stats\" section of the statistics sheet, showing various statistics about a Baccarat session.", "comment" : "Rows in the \"Game stats\" section of the statistics sheet, showing various statistics about a Baccarat session.",
"localizations" : { "localizations" : {

View File

@ -464,7 +464,7 @@ struct RevealStylePicker: View {
ForEach(RevealStyle.allCases) { style in ForEach(RevealStyle.allCases) { style in
SelectableRow( SelectableRow(
title: style.displayName, title: style.displayName,
subtitle: style.description, subtitle: style.helpText,
isSelected: selection == style, isSelected: selection == style,
accentColor: accentColor, accentColor: accentColor,
action: { selection = style } action: { selection = style }