I honestly enjoy watching and trying to do the code myself as best as I can, you do highlight things that most coders don't ever mention on their tutorials. Keep making more videos and can you possibly do a more detailed video about List and how to manipulate them with class types.
What I'm confused on is, if the variable are initialized as -1, how do the moves know not to select spots that already have a 1 or a 2? Unless using a negative 1 holds more power with conditions than I realized before. Thanks for this tutorial as I'm completely new to C#. 😊
After thinking about it for a day and testing it more I finally got it now. The funny thing in doing this exercise it taught me something huge that in all my years of programming I've never used an OR statement with any IF or While conditions. I almost exclusively test with AND or just one true condition. The compiler checks the statement from left to right. For example, if you swap the array check with the variable check on opposite sides from the OR in that While statement it creates a nasty error because it's as if you're checking memory that's outside of the allocated array. So when the compiler first encounters the original statement and sees that userTurn is a -1, then it disregards the array check and moves onto the Console Write Line and Read Line. So now that the user enters a number from 0 to 8, on the next loop that first variable condition isn't met in the OR statement, the moves on to the array check and loops back around infinitely if that array check yields a number other than 0. Long story short this whole thing is brilliant and thank you so much Professor as I've learned a new technique that I had never used before! 😄
I'm really glad I got your channel on TH-cam, Professor, you are the best . Thank you very much.
I honestly enjoy watching and trying to do the code myself as best as I can, you do highlight things that most coders don't ever mention on their tutorials. Keep making more videos and can you possibly do a more detailed video about List and how to manipulate them with class types.
Thank You so much for the tutorial. It helped me alot understanding the game. I am glad that i found this channel.
This is a great explanation, now I'm going to try and add MinMax algorithm to it.
Thank you so much for doing this lesson. It is easy to follow and understand as a beginner :)
Very good teacher. Thanks.
Thank you for a great educational lesson! 👍
Brilliant sir
Excellent videos! But why the computer keep playing one last chance, if I have already won the game? How I could correct that?
sir you are the best
Thanks for this 🔥
Thank you!
What I'm confused on is, if the variable are initialized as -1, how do the moves know not to select spots that already have a 1 or a 2? Unless using a negative 1 holds more power with conditions than I realized before. Thanks for this tutorial as I'm completely new to C#. 😊
After thinking about it for a day and testing it more I finally got it now. The funny thing in doing this exercise it taught me something huge that in all my years of programming I've never used an OR statement with any IF or While conditions. I almost exclusively test with AND or just one true condition. The compiler checks the statement from left to right. For example, if you swap the array check with the variable check on opposite sides from the OR in that While statement it creates a nasty error because it's as if you're checking memory that's outside of the allocated array. So when the compiler first encounters the original statement and sees that userTurn is a -1, then it disregards the array check and moves onto the Console Write Line and Read Line. So now that the user enters a number from 0 to 8, on the next loop that first variable condition isn't met in the OR statement, the moves on to the array check and loops back around infinitely if that array check yields a number other than 0. Long story short this whole thing is brilliant and thank you so much Professor as I've learned a new technique that I had never used before! 😄
Hello! Thanks for your very helpful videos. What about the private ones?
Anyone got an infinite loop in a draw situation?
Plz help Sara ho gaya end se or operator ni lg rha 🥲
do with design plss