SwiftUI Tic Tac Toe | Multiple AI Difficulties | MVVM | Portfolio Project

  Рет қаралды 57,259

Sean Allen

Sean Allen

Күн бұрын

Пікірлер: 145
@seanallen
@seanallen 3 жыл бұрын
If you enjoy my teaching/presentation stye, I've started creating my own iOS dev courses at seanallen.teachable.com. You can watch the first ~10% for free to get a feel for them.
@ericibrahim8871
@ericibrahim8871 3 жыл бұрын
A tip: you can watch series at flixzone. Been using it for watching lots of of movies recently.
@leosamir8840
@leosamir8840 3 жыл бұрын
@Eric Ibrahim definitely, I have been watching on Flixzone for since november myself :D
@JeffCournoyerATC
@JeffCournoyerATC 3 жыл бұрын
Every time I watch one of your videos, I’m reminded about how much I actually want to do this for a living! Thanks for all the great lessons!
@seanallen
@seanallen 3 жыл бұрын
Happy to hear that, Jeff. Go get it!
@chrispy104k
@chrispy104k 3 жыл бұрын
"....Use the 'bang' in front....". Never fails to amuse me. Great tutorial Sean. Tip: (you may already have heard this one but I know it's hard to remember it when you need it) When you have multiple instances of a bunch of variables that you want to change, lets say the prefix on them, you can create multiple cursors. Click at the beginning of the first one then hold the Control and Shift key down and click in front of the others. Now you can edit them simultaneously.
@seanallen
@seanallen 3 жыл бұрын
I always forget that one. It's funny... I've done plenty of Xcode tips and tricks videos where I show all this stuff off, but it's hard to remember them all.
@christostsangaris4785
@christostsangaris4785 3 жыл бұрын
When you see Sean posting a video you are 100% sure about the quality and the knowledge you gonna get! Awesome!! Thanks for everything Sean!
@seanallen
@seanallen 3 жыл бұрын
Thanks for the kind words, Christos 😀
@iOSAcademy
@iOSAcademy 3 жыл бұрын
This is a super good end to end video, great job!
@seanallen
@seanallen 3 жыл бұрын
Thanks man!
@colgates.
@colgates. 3 жыл бұрын
Thanks to both of you👍
@naqeebahmed7113
@naqeebahmed7113 3 жыл бұрын
both of you guys are doing great job for iOS developer.Thank you :)
@piyushagrawal08
@piyushagrawal08 3 жыл бұрын
You are great! ... Nice to see you back with fire! Awesome...
@seanallen
@seanallen 3 жыл бұрын
🔥
@KimbrellBrad
@KimbrellBrad 3 жыл бұрын
Oh Man! So timely for me.I have been wrestling with how to plan what goes into my VM or not while doing my coding. This process of getting it working first and then worrying about how to put it into the proper structure at the end really opened my eyes! Perfectly logical but when starting from scratch it was not so obvious to me. I always expect top-notch content from you and your courses but this one hit me right between the eyes! THANK YOU!
@seanallen
@seanallen 3 жыл бұрын
When I was building this video, I knew there was a lot of good nuggets in here. Happy to hear it helped with your ViewModel questions! Glad you enjoyed it.
@zainhaider6628
@zainhaider6628 2 жыл бұрын
20:10 you can use if moves[i] != nil { return }
@bestformspielt
@bestformspielt 3 жыл бұрын
I like your "chapter" analogy when talking about refactoring. That's exactly how you should think about it.
@SBSanook
@SBSanook 3 жыл бұрын
Very nice! Perfect length - I prefer the longer but more in depth videos, and this one felt way faster than 1:18. I like seeing the thought process and steps involved, too, particularly the refactor process. Seems obvious, but I always end up refactoring everything at once, rather than step-by-step shown here. Thanks!
@seanallen
@seanallen 3 жыл бұрын
Thanks for the feedback on the longer video, Scott. I rarely do these long videos, but it's something I'm experimenting with and will sprinkle in from time to time. Glad you enjoyed it!
@mountainsmusicandcode
@mountainsmusicandcode 3 жыл бұрын
Great stuff as always Sean - love the way you do those alerts. Thank you.
@seanallen
@seanallen 3 жыл бұрын
Thanks Robin!
@laurapotter6321
@laurapotter6321 3 жыл бұрын
I just love watch your video x1.5 speed to enforce myself thinking faster and keeping focus all the time!
@timmy53driver
@timmy53driver 3 жыл бұрын
Awesome video! Very clear not too much jargon to confuse we newbies. The refactoring section was the most useful. How to refactor lessons are scarce and yours made the process very clear and easy to adapt to any project. Thanks for your effort and time to share your knowledge. Timmy!
@seanallen
@seanallen 3 жыл бұрын
Glad you enjoyed it, Timmy!
@MikaelaCaron
@MikaelaCaron 3 жыл бұрын
Cool serious idea Sean! Excited to see these new videos.
@seanallen
@seanallen 3 жыл бұрын
Thanks Caleb 👍
@ruptapas
@ruptapas 3 жыл бұрын
Very nice Sean loved every bit of the process of this tutorial...
@seanallen
@seanallen 3 жыл бұрын
Thanks Ruptapas! I'm experimenting with longer, more in-depth tutorials so the feedback is appreciated.
@wadaienglish1123
@wadaienglish1123 3 жыл бұрын
Came here looking for something else, but I found this so interesting and helpful, I stayed for it all. Great tutorial as always from Sean Allen.
@dhavalnena7386
@dhavalnena7386 Жыл бұрын
Truly a Masterpiece explaining whole life cycle of a small project. Much appreciate your efforts.. Thank You Sean!!
@rungxanh2901
@rungxanh2901 3 жыл бұрын
This tutorial is clearer than crystal. Thank you very much for this portfolio project Sean 🙏🏻
@seanallen
@seanallen 3 жыл бұрын
Thanks for the kind words, Joe. Happy to hear it was easy to grasp.
@dwikurniawan1376
@dwikurniawan1376 3 жыл бұрын
I love your teaching style. very concise and easy to understand
@seanallen
@seanallen 3 жыл бұрын
Glad you enjoyed it, Dwi.
@Omeir34
@Omeir34 3 жыл бұрын
Always eager to watch your videos!
@seanallen
@seanallen 3 жыл бұрын
I appreciate that, Omair 😀
@UTubeIsMessingUp
@UTubeIsMessingUp 3 жыл бұрын
Great video man, its been about 5 years since I worked on ios and just took another 3 hour course on the basics. This gave me a lot to play around with as a first project, thank you!
@kailashanand5086
@kailashanand5086 3 жыл бұрын
great video! very comprehensive and helpful. it was just detailed enough that it didn't get boring at any point! loved it, keep up the great work!
@nelan3334
@nelan3334 Жыл бұрын
As an experienced developer in other tech (Android) I appreciate your pace! I struggle with other tutorials feeling I am loosing a lot of time, so I am really grateful that I have found this one! I have only one objection (or question) : shouldn't ViewModel be free of stuff from swiftUI (like GridItems)? If I would do this in Android, I would leave in view all UI parts of the code. Other that that, I congratulate you on awesome job with this series!
@SuperJDParker
@SuperJDParker 2 жыл бұрын
Enjoyable tutorial. Your concise, to-the-point instruction style, as well as your enthusiasm, adds value to your presentations. I liked learning more about the map(_:) method and about alert processing. Best of luck in your iOS dev courses.
@kaideumers6102
@kaideumers6102 3 жыл бұрын
Great tutorial! Really learnt something today
@seanallen
@seanallen 3 жыл бұрын
Glad to hear it, Kai 😀
@chupapimunanyo2596
@chupapimunanyo2596 Жыл бұрын
I love your way of teaching. As a computer science student who has background in other programming languages, diving headfirst into a new one (swift) by watching this is just so much better than watching a series of the basics about swift! You don't need to learn how variables and functions etc. work in swift because HERE: you just learn that on the fly while directly seeing, how different functionalities of swift can be put together in a real world exaple (ok it is tic tac toe but still... :D ) A little improvement suggestion: If these kind of videos are ment for beginners, it may be helpful to cover unique details of swift syntax like the dots or the keywords "in", "for" used in functions. I think this is a swift thing since I have never seen something similar and I had to ask ChatGPT over and over again what these little things concretely do 😀
@seanallen
@seanallen Жыл бұрын
Glad you enjoyed the tutorial. This was meant for non-beginners as it's designed to be a project someone looking for their first job might put in their portfolio. I appreciate that feedback!
@RatherBeCancelledThanHandled
@RatherBeCancelledThanHandled Жыл бұрын
Beautifully explained and executed ; well done !
@markaurelius61
@markaurelius61 3 жыл бұрын
I like the way you wrote checkWinCondition. I was using arrays and loops ( I had exactly the same order for winPatterns though)
@seanallen
@seanallen 3 жыл бұрын
Thanks, I also enjoyed that when I was building. My initial thought was loops, but then working with sets came to mind and I felt that was better.
@semilife
@semilife 3 жыл бұрын
Thanks Sean for another quality video. Practical, concise and real world. Great engaging teaching style, learning lots, keep up the great work. You are one of a few who are pushing out great regular and up to date iOS stuff. Many thanks.
@seanallen
@seanallen 3 жыл бұрын
Thanks for the kind words 😀
@consumer8592
@consumer8592 3 жыл бұрын
thank you for your knowledge and your time!
@seanallen
@seanallen 3 жыл бұрын
Happy to help!
@拉雞毛
@拉雞毛 3 жыл бұрын
It's an amazing video! Maybe it's hard to understand for programming rookies. But the step-by-step teaching makes more clear to know how to build an app. NICE WORK!
@Collins01
@Collins01 2 жыл бұрын
I am coming from a flutter background , i decided to try Native IOS. Your Tutorials are the best, Thank you very much. I have learnt a lot.❤
@w0mblemania
@w0mblemania 3 жыл бұрын
Excellent video, Sean. Thanks.
@seanallen
@seanallen 3 жыл бұрын
Thanks! Glad you enjoyed it.
@jeffreyslater4416
@jeffreyslater4416 2 жыл бұрын
Những ca sĩ khác cho mình cảm giác thư giãn khi nghe! Còn ĐP luôn cho mình bị cuốn theo tinh thần bài hát.
@ahmadwaqas6044
@ahmadwaqas6044 3 жыл бұрын
Another great piece of awesomeness like always. Thanks Sean 💕
@seanallen
@seanallen 3 жыл бұрын
Thanks for the kind words, Ahmad 👍
@GabrielBrodersen
@GabrielBrodersen 3 жыл бұрын
Thank you once again Sean!
@seanallen
@seanallen 3 жыл бұрын
Happy to help, Gabriel.
@yoellev5191
@yoellev5191 3 жыл бұрын
Sean is on fire 🔥😜
@seanallen
@seanallen 3 жыл бұрын
I took a 3 week break, so I was ready to get back at it 😀
@yoellev5191
@yoellev5191 3 жыл бұрын
@@seanallen Yep I know the feeling, we do need this break from time to time. Always happy to get a notification from your channel 💪🏼🤙🏼
@Cillitbaaang
@Cillitbaaang 3 жыл бұрын
Thanks bro! Learned a lot. Keep up the good work - maybe more of those longer vids!? 😉💪🏼
@seanallen
@seanallen 3 жыл бұрын
Glad you liked it! I plan on doing more of them. However, they take a TON of time to create. So it'll be like once a month or something like that.
@naqeebahmed7113
@naqeebahmed7113 3 жыл бұрын
this is really a great video learning swiftUI and MVVM. I really appreciate your initiative to start portfolio projects because it really help us guys beginner and intermediate to learn new thing, building small apps.
@boredbytrash
@boredbytrash 3 жыл бұрын
Great session! I like the refactoring part! I advice any software engineer to at least read about the principles of clean code. That big method that processes the moves of the player and computer could’ve been easily split up so each method is just doing ONE task and not multiple. With precise method/function names, comments get obsolet. Great tutorial and thanks for sharing such an in-depth look into TikTakToe SwiftUI development.
@a4advanture755
@a4advanture755 3 жыл бұрын
thanks Sean Allen i enjoyed your video . you are the best while during code you have some jokes >> a lot of love
@seanallen
@seanallen 3 жыл бұрын
Glad you enjoy the videos, Sikandar!
@nitinrane6226
@nitinrane6226 2 жыл бұрын
Nice video and like your teaching style
@khoiho3765
@khoiho3765 Жыл бұрын
Thankyou!, this was very helpful
@zeryez6347
@zeryez6347 3 жыл бұрын
Great Video thanks for all the effort you put into that really learned something👍
@seanallen
@seanallen 3 жыл бұрын
Happy to hear you appreciate it! That one was a lot of work and while I was building it I said to myself "there's a lot of good stuff in here". Glad to see others getting value from it.
@laigvk
@laigvk 2 жыл бұрын
Ačiū!
@kalinbalabanov1013
@kalinbalabanov1013 3 жыл бұрын
All your videos should be like this :D
@christiansimbarashe
@christiansimbarashe 3 жыл бұрын
I'm already know I'm going to like this 3 minutes in
@seanallen
@seanallen 3 жыл бұрын
That's awesome to hear! Let me know what you think at then end.
@NachoSotoBustos
@NachoSotoBustos 3 жыл бұрын
You can avoid some repetition by using do/while instead of while.
@seanallen
@seanallen 3 жыл бұрын
Great point, Nacho! Thanks for pointing it out (genuinely). There are certainly plenty of places my code can be improved. I noticed a lot of them while editing. However, after 2.5 hours of filming and another 4 hours of editing... I just let them be 😀.
@NachoSotoBustos
@NachoSotoBustos 3 жыл бұрын
@@seanallen great video though! Not easy to put out all this code out there for thousands of people to code review.
@seanallen
@seanallen 3 жыл бұрын
Thanks! I've gotten used to that over the years. Thankfully, 99% of the "code review" type comments are done in a cool manner so I actually learn a lot from them.
@nattawootsamakhom5805
@nattawootsamakhom5805 3 жыл бұрын
How to make a user login screen? Can you make a video about it? It would be very helpful for those who needed. Thank you 🙏
@nunomanuelsousa6660
@nunomanuelsousa6660 3 жыл бұрын
Excellent presentation of how to create a game with some intelligence :-) Congratulations... 5 *
@seanallen
@seanallen 3 жыл бұрын
Thanks for the kind words, Nuno. I appreciate it!
@BeetMasher
@BeetMasher 2 жыл бұрын
idk if I'm missing a point here but it seems kinda weird to me to determine the move position by rolling a dice until the result is not already occupied. Wouldn't it be more efficient to create a new array of all positions that are not already occupied and then selecting a random position from that array? Anyways, thanks a lot for the great tutorial, I really enjoyed it!
@mrskiutah
@mrskiutah 2 жыл бұрын
Great tutorial. Thank you! Why write an isSquareOccupied function that scans the moves array? Couldn't you just check if moves[i] != nil?
@いろい-b2l
@いろい-b2l 2 жыл бұрын
same question here...
@mandcali7613
@mandcali7613 Жыл бұрын
When the centerSquare is a circle4 :). Thanks for the learning though. Nice video.
@gregohb
@gregohb 3 жыл бұрын
How else would you refactor? There are a couple of structs at the bottom of the main view controller - move those to the class too?
@benhbr
@benhbr 3 жыл бұрын
Can‘t we instead of isSquareOccupied(i) just check whether moves[i] != nil ?
@gregohb
@gregohb 3 жыл бұрын
Super interesting and useful. I learned a number of things. One question - why am I not seeing the extract view at 1:13)? Also its hard to type along when you jump to different parts of the screen. by the time I stop the video with 5 second delay, then its a hassle to catch things at time. But I appreciate your effort here.
@femtechnology3055
@femtechnology3055 3 жыл бұрын
This was an amazing video! Would you ever do one on how to build a quiz app?
@seanallen
@seanallen 3 жыл бұрын
I have a VERY long video idea list 😀. That's on it... just not sure when it will happen.
@femtechnology3055
@femtechnology3055 3 жыл бұрын
@@seanallen Totally! Makes sense! Such a shame that there don't seem to be any SwiftUI tutorials on how to create a MC quiz
@boebra2276
@boebra2276 3 жыл бұрын
Thank you so much 🙏🏻
@simonIsDev
@simonIsDev 8 ай бұрын
It's pretty cool
@seanallen
@seanallen 8 ай бұрын
Glad you liked it :)
@khaledannajar
@khaledannajar Жыл бұрын
Are you going to make other projects like this?
@jazz_devk1
@jazz_devk1 Жыл бұрын
Thank you!
@laurapotter6321
@laurapotter6321 3 жыл бұрын
thank you so much!!
@KatukendaHome
@KatukendaHome 3 жыл бұрын
just finished. interesting
@thenotoriousDFL
@thenotoriousDFL 2 жыл бұрын
For those of you too lazy to type: let winPatterns: Set = [[0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8], [0,4,8], [2,4,6]]
@James-pj6cg
@James-pj6cg 2 жыл бұрын
@ 52:35 is it "best practice" to move the isGameboardDisabled = true or put isGameboardDisabled = false in the resetGame function?
@carissarichardson9867
@carissarichardson9867 2 жыл бұрын
could you do a video using Uikit for tic tac toe? I have already I just want to see a Professional
@mikeysplayhouse1971
@mikeysplayhouse1971 6 ай бұрын
Moving variables to the 'GameViewModel and declaring them Published was a breaking move for me. Maybe it's a version issue?
@markph0204
@markph0204 3 жыл бұрын
I love learning --- suggest that moves[index]?.indicator != inside isSquareOccupied() would be more efficient and simplifies the learning curve for new programmers, no?
@hananalshammari5127
@hananalshammari5127 3 жыл бұрын
if let move = moves[i] { Image(systemName: move.indicator) .resizable() .foregroundColor(.white) .frame(width: 50, height: 50) .font(.title) } consider this to get rid of the warning saying no systemName in Sf called ""
@karljay7473
@karljay7473 3 жыл бұрын
Worked! Thanks.
@Engjeanluiz
@Engjeanluiz 3 жыл бұрын
Amazing !!!!!
@seanallen
@seanallen 3 жыл бұрын
Thanks Jean!
@jaymartinez311
@jaymartinez311 3 жыл бұрын
I thought you were quitting doing videos in programming and focusing on the financial stuff i think you said in the passed. Caught this video late but it’s definitely good to see pop up. Great video and i like the longer videos. Hope to see more like it. You were the first swift channel i followed and swift is now my main language. Appreciate you and i wanted to ask if you were going to add more content to your course on teachable(which i own) or are you coming out with a more advance course? 🤔
@seanallen
@seanallen 3 жыл бұрын
Happy to hear you enjoy the larger videos. I have an intermediate SwiftUI course coming out in a week or so. As for the finance channel, that will be sometime after WWDC and will be a side project to the iOS dev videos. I will do both.
@leonardadrian1173
@leonardadrian1173 2 жыл бұрын
just saw your videos of recent its really a break through..
@marijkehagemans4332
@marijkehagemans4332 3 жыл бұрын
Hi Sean, thanks for the great tutorial. I have been playing with refactoring my swiftui project to MVVM too. In your video I am missing the model part. What would you put in the model ?
@seanallen
@seanallen 3 жыл бұрын
For this specific app (Tic Tac Toe) - the Move object as well as the Player enum could be considered the part of the Model. If you were asking about you specific project, that's tough to say as I know nothing about your project. In general the Model should be your objects. In the Tic Tac Toe example, the Move is one of our objects.
@MathyosSarkiss
@MathyosSarkiss 3 жыл бұрын
Thanks for the great videos...I have a question, how do you keep track of the Swift tricks like the array. contain where put $0? I'm a c++ program i can easily think of doing it as if moves[i] != nil
@jamesreal3713
@jamesreal3713 2 жыл бұрын
Code you did this in UIKit?
@_thekick3r
@_thekick3r 2 жыл бұрын
I get an error saying *"Cannot convert value of type '[Move?]' to expected argument type '[Move]"* at the checkWinCondition part for the human. Please help me. if checkWinCondition(for: .human, in: moves) { print("User wins") return }
@roadcoolibiza
@roadcoolibiza 4 ай бұрын
Hi Sean! I'm a big follower of your Swift tutorials and following "SwiftUI Tic Tac Toe | Multiple AI Difficulties | MVVM | Portfolio Project" I'm developing a new game, I just finished the first release for 1 player against the computer. I would really like to enable multi-player play both live and online, through Apple's Game Center and then enable leaderboards and achievements. I was unable to find suitable tutorials for this purpose. It would be great if you took the time to update your awesome SwiftUI Tic Tac Toe tutorial with Game Center features. I believe that a professional like you could have great satisfaction with all his followers by completing the video you published 3 years ago, considering over 55k views and enthusiastic reviews. Thank you!!! 👋🤟
@hananalshammari5127
@hananalshammari5127 3 жыл бұрын
determainComputerMove will go on infinite loop after the last tapped square
@OwlChillStation
@OwlChillStation 2 жыл бұрын
Nice video! However your ViewModel must never be aware of SwiftUI!
@lakithjayalath9411
@lakithjayalath9411 3 жыл бұрын
When developing a game (may be a 2D game or fun little game like you developed in this video) do you think it is better to use SwiftUI or spritekit. I am new to swift and have only played around with UIKit and I'm planning on learning SwiftUI or spritekit for a game I'm thinking of developing. What is your suggestion? Is it possible to make a good game using SwiftUI?
@seanallen
@seanallen 3 жыл бұрын
This really depends on the game. Simple games like tic tac toe are probably fine in SwiftUI. But the more serious the game, you're probably better off with a game engine.
@lakithjayalath9411
@lakithjayalath9411 3 жыл бұрын
@@seanallen Got it.Thanks.
@williamsquires3070
@williamsquires3070 2 жыл бұрын
I didn’t like this implementation, so I added another case, “empty” to the “Player” enum. Now, I can initialize the entire board[] array with Move instances with no nils in it, so: @State private var board: [Moves] = Array(repeating: Move(player: .empty, boardIndex: -1), count: 9) Now I don’t need nil coalescing, or optional unwrapping, so changed the line: Image(systemName: board[i].indicator) by getting rid of the “?”. and changed the computed property getter for struct Move to: var indicator: String { let result = (player == .human ? “xmark” : (player == .computer ? “circle” : “”)) return result } Finally, my onTapGesture is now: onTapGesture { let aMove: Move = Move(player: isHumansTurn ? .human : .computer, boardIndex: i) if board[i].player == .empty { board[i] = aMove isHumansTurn.toggle() didPlayerWin() } } which calls a method I wrote called, “didPlayerWin()”, which checks each row and column, and the two diagonals to see if they’re filled with either .human or .computer and prints an appropriate message to the console (for now). If no row, column, or diagonal is filled, it checks to see if all the board has been filled (i. e., no cell contains .empty) and prints “Tie”, else it prints “Game still in progress.” Sadly, my implementation of didPlayerWin() is far too long to print here, and involves two other helper functions which I also wrote, “check3squaresForX()”, and “check3squaresForO()”. I’ll leave to your imagination as to what these do. 😉
@andryo59
@andryo59 2 жыл бұрын
How to align equal signs like in 45:55?
@seanallen
@seanallen 2 жыл бұрын
I manually tab them over. It's extra work, but in my opinion makes the code more readable.
@markph0204
@markph0204 3 жыл бұрын
Extract Subview is gone in Xcode 12.5 for me, but you also used same...? :(
@markph0204
@markph0204 3 жыл бұрын
I found the issue -- command line tools was not properly set. This made *some* refactoring options not visible in project!
@Animatrix-t2g
@Animatrix-t2g 3 жыл бұрын
.alert(item:content:) will be deprecated in future version of iOS
@AmCanTech
@AmCanTech 3 жыл бұрын
open source??
@karljay7473
@karljay7473 3 жыл бұрын
If someone does something like this on KZbin, it's automatically open for anyone to use. You're probably looking for a repo of the source. I haven't found one. I'm typing it in myself. It might be disrespectful to Sean to post the code without asking, it could be a part of his business plan, so I won't post without asking and I don't have the completed code yet.
@AmCanTech
@AmCanTech 3 жыл бұрын
@@karljay7473 Agreed, it's a tutorial at the end of the day
@hrajput4
@hrajput4 3 жыл бұрын
Is this really an AI solution?
@seanallen
@seanallen 3 жыл бұрын
It's an insanely basic decision-making one, but by definition... yes. I used the term "AI" mostly to communicate in the title that we will be programming the game to take actions based on the human moves.
@karljay7473
@karljay7473 3 жыл бұрын
There could be debate about this, but I always heard that it has to improve itself over time. I'm not sure where I got that from, but it's one of the things that I've heard in the past. It needs to be able to learn from what it's done in the past and improve upon that over time. AI really isn't well defined, or at least I find different definitions. Having said that, this is a great tutorial, love that Sean has embraced SwiftUI.
@davidruvinskiy6347
@davidruvinskiy6347 3 жыл бұрын
Hey Sean thanks for the video. Haven’t watched all of it yet, but I know it’s going to be awesome. It’d be really cool if you could take the AI one step further with something called the Minimax algorithm: www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-3-tic-tac-toe-ai-finding-optimal-move/amp/. I’ve always wanted to implement the algorithm in Swift but could never figure out how since it involves some pretty complicated logic. Thanks!
@seanallen
@seanallen 3 жыл бұрын
I believe this would make an unbeatable AI tho. A game of tic tac toe should never be won if both players are making optimal moves. I kept my AI algorithm relatively simple for two reasons. 1. Ease of understanding for people early in their learning journey. Like you said, making that unbeatable AI gets pretty complicated and I didn't want to lose people. 2. I wanted to allow the AI to make mistakes so that it could be beat.
@davidruvinskiy6347
@davidruvinskiy6347 3 жыл бұрын
Sean Allen Gotchya. No worries. Also, do you think you can include a link to the completed project?
@seanallen
@seanallen 3 жыл бұрын
I'm still thinking about that. I want to avoid people just downloading the project, putting it on their Github and saying "Cool, here's a free portfolio project". Maybe I'm being too negative, but I want people who actually went through the video and learned stuff to have the reward of the code.
@TechRagh
@TechRagh 3 жыл бұрын
@@seanallen Absolutely, 🙌🏼
@rungxanh2901
@rungxanh2901 3 жыл бұрын
@@seanallen I second this ✌🏻
@petitcomiteparis6685
@petitcomiteparis6685 2 жыл бұрын
Thank you for your Tutorial! I was coding, till the point -to the new folder and copy from GameView to GameViewModel.. Than I was lost 😧because can't fixed all the error lines like you! So I was go back with command and Z but all was lost 🥺...😩 because I did clean so much from -my on mistakes and was so happy and proud ,till this FukkNewFolder 😿 This Tutorial did stressed me so much because my Xcode makes so many redlines. Maybe I did code on this 10 hours without result 🤡Next time always copy all that shit I did do on an safe place !❤‍🩹 (P.S.) I'm beginner and this was my first App till 13 min. to the end of this Tutorial! All other Tutorials I did was always the problem this I can't fix my mistakes or bugs in Xcode. Its so hart to learn alone, im sad and happy, im frustrated and motivated, im in love and make it again but need now pasta Best reagents from Berlin sorry for my bad english 👻 much love 🦄
SwiftUI Search Bar - Searchable
6:15
Sean Allen
Рет қаралды 21 М.
SwiftUI List with Custom Cell & Passing Data
36:27
Sean Allen
Рет қаралды 118 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 173 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 98 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 53 МЛН
The "Impossible Torpedo" was real
16:33
Steve Mould
Рет қаралды 819 М.
How to Get User Location on a Map - Swift
26:11
Sean Allen
Рет қаралды 65 М.
Create a weather app from scratch with this SwiftUI Crash Course
37:04
31 Xcode Tips & Tricks - 2023
17:45
Sean Allen
Рет қаралды 42 М.
Python vs Swift | Chris Lattner and Lex Fridman
11:16
Lex Clips
Рет қаралды 156 М.
5 Steps to Better SwiftUI Views
31:19
Paul Hudson
Рет қаралды 56 М.
SwiftUI Basics Tutorial
1:19:31
Sean Allen
Рет қаралды 402 М.
Swift Closures Explained
14:23
Sean Allen
Рет қаралды 68 М.
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 173 МЛН