Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
9ac5320782
commit
7800d3474d
173
Baccarat/README.md
Normal file
173
Baccarat/README.md
Normal file
@ -0,0 +1,173 @@
|
||||
# Baccarat - Casino Card Game
|
||||
|
||||
A feature-rich Baccarat (Punto Banco) app for iOS built with SwiftUI. Experience authentic casino gameplay with side bets, road map history, and detailed statistics — all without risking real money.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Features
|
||||
|
||||
### 🎰 Authentic Punto Banco Gameplay
|
||||
- Complete Baccarat rules with automatic third card logic
|
||||
- Natural detection (8 or 9 on initial deal)
|
||||
- Multi-deck shoe support (1, 6, or 8 decks)
|
||||
- Animated card dealing with sound effects and haptics
|
||||
- Automatic shoe reshuffling with burn card
|
||||
|
||||
### 💰 Betting Options
|
||||
|
||||
#### Main Bets
|
||||
| Bet Type | Payout | House Edge |
|
||||
|----------|--------|------------|
|
||||
| Player | 1:1 | 1.24% |
|
||||
| Banker | 0.95:1 (5% commission) | 1.06% |
|
||||
| Tie | 8:1 | 14.4% |
|
||||
|
||||
#### Side Bets
|
||||
| Bet Type | Payout |
|
||||
|----------|--------|
|
||||
| Player Pair | 11:1 |
|
||||
| Banker Pair | 11:1 |
|
||||
| Dragon Bonus (Natural) | 1:1 |
|
||||
| Dragon Bonus (Win by 4) | 1:1 |
|
||||
| Dragon Bonus (Win by 5) | 2:1 |
|
||||
| Dragon Bonus (Win by 6) | 4:1 |
|
||||
| Dragon Bonus (Win by 7) | 6:1 |
|
||||
| Dragon Bonus (Win by 8) | 10:1 |
|
||||
| Dragon Bonus (Win by 9) | 30:1 |
|
||||
|
||||
### 📊 Road Map History
|
||||
- Visual "Big Road" style result display
|
||||
- Color-coded outcomes (Blue=Player, Red=Banker, Green=Tie)
|
||||
- Pair markers (yellow dot)
|
||||
- Natural markers (star)
|
||||
- Scrollable session history
|
||||
|
||||
### 🎚️ Table Limits
|
||||
| Level | Min Bet | Max Bet |
|
||||
|-------|---------|---------|
|
||||
| Casual | $5 | $500 |
|
||||
| Low Stakes | $10 | $1,000 |
|
||||
| Medium Stakes | $25 | $5,000 |
|
||||
| High Stakes | $100 | $10,000 |
|
||||
| VIP | $500 | $50,000 |
|
||||
|
||||
### ☁️ iCloud Sync
|
||||
- Balance and statistics sync across devices
|
||||
- Settings persist via iCloud
|
||||
- Automatic conflict resolution
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
Baccarat/
|
||||
├── BaccaratApp.swift # App entry point
|
||||
├── ContentView.swift # Root view
|
||||
├── Engine/
|
||||
│ ├── BaccaratEngine.swift # Core game logic, third card rules, payouts
|
||||
│ └── GameState.swift # Observable state machine
|
||||
├── Models/
|
||||
│ ├── BetType.swift # Bet types, payouts, Dragon Bonus table
|
||||
│ ├── GameResult.swift # Round outcomes
|
||||
│ ├── GameSettings.swift # User preferences, table limits
|
||||
│ ├── Hand.swift # Baccarat hand model
|
||||
│ └── Shoe.swift # Multi-deck shoe with shuffle/burn
|
||||
├── Storage/
|
||||
│ └── BaccaratGameData.swift # Persistence models
|
||||
├── Theme/
|
||||
│ └── DesignConstants.swift # Design system tokens
|
||||
├── Views/
|
||||
│ ├── Development/ # Dev-only views (branding, icons)
|
||||
│ ├── Game/ # Main game UI components
|
||||
│ ├── Sheets/ # Modal views (settings, stats, rules)
|
||||
│ └── Table/ # Table layout, betting zones, road map
|
||||
└── Resources/
|
||||
└── Localizable.xcstrings # Localization strings
|
||||
```
|
||||
|
||||
## Game Rules
|
||||
|
||||
### Card Values
|
||||
- **Ace**: 1 point
|
||||
- **2-9**: Face value
|
||||
- **10, J, Q, K**: 0 points
|
||||
- Hand value = sum mod 10 (e.g., 7+8=15 → 5)
|
||||
|
||||
### Third Card Rules
|
||||
|
||||
#### Player
|
||||
- 0-5: Draws third card
|
||||
- 6-7: Stands
|
||||
- 8-9: Natural (no third card)
|
||||
|
||||
#### Banker (when Player draws)
|
||||
| Banker Total | Draws if Player's 3rd is... |
|
||||
|--------------|----------------------------|
|
||||
| 0-2 | Always draws |
|
||||
| 3 | 0-7, 9 (not 8) |
|
||||
| 4 | 2-7 |
|
||||
| 5 | 4-7 |
|
||||
| 6 | 6-7 |
|
||||
| 7 | Never draws |
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **iOS 26.0+** target
|
||||
- **Swift 6.2** with strict concurrency
|
||||
- **SwiftUI** with `@Observable` for state management
|
||||
- **CasinoKit** — Shared package for cards, chips, sounds, and common UI
|
||||
- **CloudKit** — iCloud sync for game data and settings
|
||||
|
||||
## Requirements
|
||||
|
||||
- Xcode 16.0+
|
||||
- iOS 26.0+ deployment target
|
||||
- Swift 6.2+
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Open `CasinoGames.xcworkspace` in Xcode
|
||||
2. Select the **Baccarat** scheme
|
||||
3. Build and run on a simulator or device
|
||||
|
||||
## Localization
|
||||
|
||||
The app supports:
|
||||
- English (en)
|
||||
- Spanish - Mexico (es-MX)
|
||||
- French - Canada (fr-CA)
|
||||
|
||||
Strings are managed via String Catalogs (`Localizable.xcstrings`).
|
||||
|
||||
## Design System
|
||||
|
||||
All UI values are centralized in `DesignConstants.swift`:
|
||||
- Spacing, corner radii, font sizes
|
||||
- Opacity and shadow values
|
||||
- Animation durations
|
||||
- Semantic color definitions
|
||||
|
||||
## Accessibility
|
||||
|
||||
- Full VoiceOver support with meaningful labels
|
||||
- Dynamic Type for scalable text
|
||||
- High-contrast visuals
|
||||
- Accessibility summaries for road map history
|
||||
|
||||
## Why Baccarat?
|
||||
|
||||
- **Lowest house edge** in the casino (1.06% on Banker bet)
|
||||
- **No skill required** — pure chance with simple rules
|
||||
- **Fast-paced** gameplay
|
||||
- **Elegant** and sophisticated atmosphere
|
||||
- **James Bond's favorite** casino game
|
||||
|
||||
## License
|
||||
|
||||
This project is proprietary software. All rights reserved.
|
||||
|
||||
---
|
||||
|
||||
*Built with ❤️ using SwiftUI*
|
||||
|
||||
141
Blackjack/README.md
Normal file
141
Blackjack/README.md
Normal file
@ -0,0 +1,141 @@
|
||||
# Blackjack 21 - Casino Card Game
|
||||
|
||||
A feature-rich Blackjack app for iOS built with SwiftUI. Master basic strategy, learn card counting, and enjoy an authentic casino experience — all without risking real money.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Features
|
||||
|
||||
### 🎰 Authentic Casino Gameplay
|
||||
- Full Blackjack gameplay with all standard actions: Hit, Stand, Double Down, Split, Surrender
|
||||
- Insurance betting when dealer shows an Ace
|
||||
- Realistic multi-deck shoe with configurable penetration
|
||||
- Animated card dealing with sound effects and haptic feedback
|
||||
- Reshuffle notifications when the cut card is reached
|
||||
|
||||
### 🃏 Multiple Rule Variations
|
||||
| Style | Description |
|
||||
|-------|-------------|
|
||||
| **Vegas Strip** | 6 decks, dealer stands on soft 17, double after split, 3:2 blackjack |
|
||||
| **Atlantic City** | 8 decks, late surrender, re-split aces allowed |
|
||||
| **European** | No hole card (dealer gets second card after player acts) |
|
||||
| **Custom** | Configure every rule to your preference |
|
||||
|
||||
### 💰 Side Bets
|
||||
Optional side bets for extra excitement:
|
||||
|
||||
**Perfect Pairs** — Bet on your first two cards forming a pair:
|
||||
- Mixed Pair (different colors): 6:1
|
||||
- Colored Pair (same color): 12:1
|
||||
- Perfect Pair (same suit): 25:1
|
||||
|
||||
**21+3** — Poker hand from your two cards + dealer's upcard:
|
||||
- Flush: 5:1
|
||||
- Straight: 10:1
|
||||
- Three of a Kind: 30:1
|
||||
- Straight Flush: 40:1
|
||||
- Suited Trips: 100:1
|
||||
|
||||
### 📚 Basic Strategy Hints
|
||||
- Real-time strategy suggestions for every hand
|
||||
- Accounts for game rules (surrender availability, dealer hits soft 17, etc.)
|
||||
- Learn the mathematically optimal play for every situation
|
||||
|
||||
### 🎓 Card Counting Trainer
|
||||
Professional-grade tools for learning the Hi-Lo system:
|
||||
- **Running Count** — Live count as cards are dealt
|
||||
- **True Count** — Adjusted for remaining decks
|
||||
- **Betting Hints** — Recommendations based on count advantage
|
||||
- **Illustrious 18** — Count-adjusted strategy deviations
|
||||
|
||||
### 📊 Statistics Tracking
|
||||
- Win rate, blackjack count, bust rate
|
||||
- Session net profit/loss
|
||||
- Biggest wins and losses
|
||||
- Complete round history
|
||||
|
||||
### ☁️ iCloud Sync
|
||||
- Balance and statistics sync across devices
|
||||
- Settings persist via CloudKit
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
Blackjack/
|
||||
├── BaccaratApp.swift # App entry point
|
||||
├── ContentView.swift # Root view
|
||||
├── Engine/
|
||||
│ ├── BlackjackEngine.swift # Core game logic, basic strategy, card counting
|
||||
│ └── GameState.swift # Observable state machine
|
||||
├── Models/
|
||||
│ ├── BetType.swift # Bet type definitions
|
||||
│ ├── GameResult.swift # Hand results and round outcomes
|
||||
│ ├── GameSettings.swift # User preferences and rule configuration
|
||||
│ ├── Hand.swift # BlackjackHand model
|
||||
│ └── SideBet.swift # Side bet types and evaluation
|
||||
├── Storage/
|
||||
│ └── BlackjackGameData.swift # Persistence models
|
||||
├── Theme/
|
||||
│ └── DesignConstants.swift # Design system tokens
|
||||
├── Views/
|
||||
│ ├── Development/ # Dev-only views (branding, icons)
|
||||
│ ├── Game/ # Main game UI components
|
||||
│ ├── Sheets/ # Modal views (settings, stats, rules)
|
||||
│ └── Table/ # Table layout components
|
||||
└── Resources/
|
||||
└── Localizable.xcstrings # Localization strings
|
||||
```
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **iOS 26.0+** target
|
||||
- **Swift 6.2** with strict concurrency
|
||||
- **SwiftUI** with `@Observable` for state management
|
||||
- **CasinoKit** — Shared package for cards, chips, sounds, and common UI
|
||||
- **CloudKit** — iCloud sync for game data and settings
|
||||
|
||||
## Requirements
|
||||
|
||||
- Xcode 16.0+
|
||||
- iOS 26.0+ deployment target
|
||||
- Swift 6.2+
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Open `CasinoGames.xcworkspace` in Xcode
|
||||
2. Select the **Blackjack** scheme
|
||||
3. Build and run on a simulator or device
|
||||
|
||||
## Localization
|
||||
|
||||
The app supports:
|
||||
- English (en)
|
||||
- Spanish - Mexico (es-MX)
|
||||
- French - Canada (fr-CA)
|
||||
|
||||
Strings are managed via String Catalogs (`Localizable.xcstrings`).
|
||||
|
||||
## Design System
|
||||
|
||||
All UI values are centralized in `DesignConstants.swift`:
|
||||
- Spacing, corner radii, font sizes
|
||||
- Opacity and shadow values
|
||||
- Animation durations
|
||||
- Semantic color definitions
|
||||
|
||||
## Accessibility
|
||||
|
||||
- Full VoiceOver support with meaningful labels and hints
|
||||
- Dynamic Type for scalable text
|
||||
- Accessibility announcements for game events
|
||||
|
||||
## License
|
||||
|
||||
This project is proprietary software. All rights reserved.
|
||||
|
||||
---
|
||||
|
||||
*Built with ❤️ using SwiftUI*
|
||||
|
||||
@ -73,12 +73,11 @@ public struct ChipSelectorView: View {
|
||||
.disabled(!canUseChip(denomination))
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, CasinoDesign.Spacing.xLarge)
|
||||
.padding(.vertical, CasinoDesign.Spacing.medium)
|
||||
.frame(minWidth: geometry.size.width) // Center when content fits
|
||||
}
|
||||
.scrollClipDisabled() // Prevent harsh clipping during scroll/animation
|
||||
.scrollBounceBehavior(fitsOnScreen ? .basedOnSize : .automatic)
|
||||
.padding(.horizontal, CasinoDesign.Spacing.xLarge)
|
||||
.padding(.vertical, CasinoDesign.Spacing.medium)
|
||||
.frame(minWidth: geometry.size.width) // Center when content fits
|
||||
}
|
||||
.scrollBounceBehavior(fitsOnScreen ? .basedOnSize : .automatic)
|
||||
}
|
||||
.frame(height: CasinoDesign.Size.chipLarge + CasinoDesign.Spacing.medium * 2)
|
||||
.accessibilityElement(children: .contain)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user