iOS CardWar App

iOS Card War Game

This is a very simple iOS app that is based off the traditional card game, War. In the traditional game, players try to win all the cards by dealing a deck evenly between two players, then simultaneously flipping their top card to see who has the higher value. The player with the higher card takes both cards and places them at the bottom of their deck. If the cards are the same rank, it's a "war," and players lay down a few more cards (typically three face down, one face up) to determine the winner of the larger pot. This is a simplified version of the original, and players click a deal button to be randomly assign a card to themselves, and a CPU player. Whichever player's card has a higher value is assigned a point, and if it is a draw, neither player is assigned a point.


Technology Utilized

Swift 5.0 SwiftUI Xcode 15 iOS 17.5+ MVVM

This War card game application is a native iOS app built using Swift 5.0 and SwiftUI, Apple's modern declarative UI framework. Developed in Xcode 15.4, the app targets iOS 17.5+ and supports both iPhone and iPad devices in portrait and landscape orientations. The application follows SwiftUI's modern app lifecycle using the @main attribute and implements reactive state management through @State property wrappers, adhering to an MVVM architectural pattern. All visual assets, including playing card images, backgrounds, logos, and buttons, are managed through Xcode's asset catalog system. The app is entirely self-contained with no external dependencies, third-party frameworks, or networking services, relying solely on Swift's Foundation framework for core functionality like random number generation. Build configuration includes automatic code signing and Swift asset symbol generation, with SwiftUI preview support enabled for streamlined development.


Build Context

This is the first iOS app I built in order to learn about Xcode, Swift, and SwiftUI. It was a very simple app just to introduce me to Apple's development suite and I learned the basics of the language and architecture of an iOS application.


Changes and Improvements

I have not made any changes to this app as this was just for me to learn the skills to develop more complex and challenging applications.