Simple iOS War Card game built with Swift and UIKit. Inspired by 'Code with Chris'.
- Tap the "Deal" button to flip two cards — one for each player.
- The player with the higher card earns a point.
- In case of a tie, both players lose a point (if their score is greater than 1).
- First to reach your own score goal wins (or just keep playing for fun!).
- Simple, interactive UI with two card image views.
- Real-time score tracking for both players.
- Randomized card draw using
arc4random_uniform.
ViewController.swift: Contains all game logic, UI outlets, and gameplay actions.AppDelegate.swift: Standard lifecycle management for the iOS app.Info.plist: Metadata for the app bundle.
- Card images must be named in the format
card2,card3, ...,card14representing values 2 (lowest) to Ace (highest, treated as 14).
- Clone or download this repository.
- Open project in Xcode.
- Make sure you have the necessary image assets in your
Assets.xcassetsfolder. - Build and run on a simulator or device.
- iOS 11.0+
- Xcode 11+
- Swift 5
Repo by Chaira Harder 📧 chairachananharder@gmail.com