Since last Wednesday, I'm working on an internship vacancy "mini-test" that is a expansible TicTacToe table which goes from 3x3 up to 10x10. I've only experienced SwiftUI's views on iPad's Swift Playgrounds. Taking that challenge was kind breathtaking in the beginning, but along 4 days of code it was such an awesome learning experience. Your video is helping a lot! Thanks, Cal.
Way too fast paced for a beginner tutorial. Also, lots of unexplained code decisions, especially in terms of Swift-specifc things. What does @Published mean and why are we using it? What is ObservableObject? why did we have to create a class for GameState? Code Readability - for example, this line: let winner = turn == Tile.Cross ? "Crosses" : "Noughts" makes sense to me as someone with plenty of C/C++ experience, but a beginner might have more trouble understanding what exactly this line is doing compared to something like if (turn == Tile.Cross) { let winner = "Crosses" } else { let winner = "Noughts" } Yes, the first option is a clever one-liner, while the second option is 6 lines, but the second option is arguably much more readable and understandable, important features of a beginner tutorial Calling a function before defining it, or even mentioning it - for example at 4:48, we called gameState.placeTile(row, column) out of nowhere, and THEN mentioned it, THEN defined it. For a beginner tutorial, it would be helpful to know what functions and variables we need BEFORE jumping straight into the code. Overall, this video is good as a showcase (though bordering on a speedrun), but definitely not suitable as a "beginner tutorial" for someone who would like to retain useful information
Thanks 🙏 sure I can put a part 2 to the SwiftUI calendar tutorial on the to do list. No I'm not on Patreon. GitHub sponsor, or YT membership. I've starting experimenting with.
Simple fix! Just add a boolean var called "gameWon" (or something along those lines) in the GameState and set to false. Inside the checkForDraw func, put the contents of the function inside an if(!gameWon){ }. Set the gameWon to true when theres a victory (just under the "showAlert = true" worked for me) and then set gameWon back to false when clicking okay on the alert and resetting the board in the ContentView. This way, a check for a draw only takes place if a winner hasn't already been decided and there is no space left on the board. Of course if there is no winner, the contents of the checkForDraw function will run as it should. Hope this helps! Great tutorial otherwise :)
Sir, I really need your help on this. "Schedule Local Notifications Android Studio Kotlin Tutorial" video.. Is there ay way I you can do this in JAVA also? Please help me..
Since last Wednesday, I'm working on an internship vacancy "mini-test" that is a expansible TicTacToe table which goes from 3x3 up to 10x10. I've only experienced SwiftUI's views on iPad's Swift Playgrounds. Taking that challenge was kind breathtaking in the beginning, but along 4 days of code it was such an awesome learning experience.
Your video is helping a lot!
Thanks, Cal.
Way too fast paced for a beginner tutorial. Also, lots of unexplained code decisions, especially in terms of Swift-specifc things. What does @Published mean and why are we using it? What is ObservableObject? why did we have to create a class for GameState?
Code Readability - for example, this line:
let winner = turn == Tile.Cross ? "Crosses" : "Noughts"
makes sense to me as someone with plenty of C/C++ experience, but a beginner might have more trouble understanding what exactly this line is doing compared to something like
if (turn == Tile.Cross) {
let winner = "Crosses"
}
else {
let winner = "Noughts"
}
Yes, the first option is a clever one-liner, while the second option is 6 lines, but the second option is arguably much more readable and understandable, important features of a beginner tutorial
Calling a function before defining it, or even mentioning it - for example at 4:48, we called gameState.placeTile(row, column) out of nowhere, and THEN mentioned it, THEN defined it. For a beginner tutorial, it would be helpful to know what functions and variables we need BEFORE jumping straight into the code.
Overall, this video is good as a showcase (though bordering on a speedrun), but definitely not suitable as a "beginner tutorial" for someone who would like to retain useful information
Great tutorial! Are you planning on making a SwiftUI calendar tutorial with daily events?
Also, do you have a Patreon?
Thanks 🙏 sure I can put a part 2 to the SwiftUI calendar tutorial on the to do list.
No I'm not on Patreon. GitHub sponsor, or YT membership. I've starting experimenting with.
Very cool!
Buen video.
It had 20 errors. How to fix it?
Sir.. Very helpful video
why but I am getting 8 errors ???
At 10:38 X wins it is not a draw lol
You are right! ⭐️
Simple fix! Just add a boolean var called "gameWon" (or something along those lines) in the GameState and set to false. Inside the checkForDraw func, put the contents of the function inside an if(!gameWon){ }. Set the gameWon to true when theres a victory (just under the "showAlert = true" worked for me) and then set gameWon back to false when clicking okay on the alert and resetting the board in the ContentView.
This way, a check for a draw only takes place if a winner hasn't already been decided and there is no space left on the board. Of course if there is no winner, the contents of the checkForDraw function will run as it should. Hope this helps!
Great tutorial otherwise :)
My fix,
if(chechForDraw(){
İf(showAlert==false){
alertMessage = “Draw”
showAlert = true
}
}
// :) thank you bro basic but perfect :)
Sir, I really need your help on this. "Schedule Local Notifications Android Studio Kotlin Tutorial" video.. Is there ay way I you can do this in JAVA also? Please help me..
Bruh
Sir Plesse contact me.