Рет қаралды 56,132
Head to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.
Today we're building a Tic Tac Toe game in SwiftUI. But we are stepping it up a notch and building out the logic for our computer AI opponent to scale in difficulty. We will build the game board UI in SwiftUI, then check for win or draw conditions, then build up our AI logic and we'll finish up by refactoring into MVVM (Model View ViewModel). There's a lot to learn in this video so I hope you complete it 😀.
This video kicks off my "Portfolio Project" series for iOS developers in SwiftUI. This series is all about create fun little projects to help build up your portfolio. The idea is for you build upon these projects and make them your own. Use them as a baseline.
This tutorial was created in Xcode 12.5 and Swift 5.4.
SF Symbols Video:
• What's New in SFSymbol...
If you like my teaching or presentation style, I've started creating my own courses:
seanallen.teachable.com/
Timestamps
What Are We Building? - 0:00
Game Board UI - 1:12
Create Move Object - 9:36
Check if Square is Occupied - 17:07
Start Computer AI - Easy Mode - 20:33
AI Logic Overview - 23:16
Computer Moves - 23:37
Disable Game Board - 28:43
Win & Draw Conditions - 31:27
Win, Lose or Draw Alerts - 43:17
Making our AI Smarter - 52:35
Refactor & MVVM - 1:03:53
Recommendations - 1:17:39
Twitter:
/ seanallen_dev
Link to my book - How I Became an iOS Developer:
gumroad.com/l/sean-allen-origin
Hired.com:
hired.com/x/1n01g
Check out my podcast, iOS Dev Discussions:
itunes.apple.com/us/podcast/i...
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Ray Wenderlich Books:
store.raywenderlich.com/a/208...
Ray Wenderlich Videos:
store.raywenderlich.com/a/208...
Paul Hudson's Hacking With Swift:
gumroad.com/a/762098803
Learn Advanced Swift Here:
gumroad.com/a/656585843
Links to my iOS Dev Setup & iOS Dev Book Recommendations
www.amazon.com/shop/seanallen
#swift #softwaredeveloper #iosdeveloper