- 🃏 Classic Spider Solitaire gameplay
- 🌈 Smooth animations and intuitive drag-and-drop interface
- 🔢 Multiple difficulty levels (1, 2, or 4 suits)
- ⏱️ Time and move tracking
- 💡 Hints
- 👆 Tap to move
- 🏆 Score calculation
- 💾 Game state persistence
- 🌄 Landscape & macOS support
- 🎆 Win animation
- 🎨 Customizable card designs
Start | Card Movement | Undo |
Draw | Hint | Complete Set |
- iOS 18.0+/macOS 14.0+
- Xcode 16.0+
- Swift 6
Installation
- Clone the repository:
git clone https://github.com/mazjap/spider-solitaire.git
- Open the project in Xcode:
cd spider-solitaire
open SpiderSolitaire.xcodeproj
- Build and run the project in Xcode.
- Choose your difficulty level: 1 suit (Easiest), 2 suits (Medium), or 4 suits (Hard).
- Drag cards to build descending sequences of the same suit.
- Complete a sequence from King to Ace to remove it from the table.
- Use the draw pile to add new cards when you're stuck.
- Clear all cards from the table to win!
This project follows the MVVM (Model-View-ViewModel) architecture and utilizes SwiftUI's latest features:
- GameView: Main view containing the game board
- CardView: Custom view for rendering individual cards
- CardStackView: Manages stacks of cards in columns
- GameViewModel: Handles game logic and state management
- GameState: Represents the current state of the game
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.