How to program Tic Tac Toe in C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 18

  • @abdulwahabraheemi
    @abdulwahabraheemi 3 ปีที่แล้ว +6

    I'm really glad I got your channel on TH-cam, Professor, you are the best . Thank you very much.

  • @shuhadloofer7192
    @shuhadloofer7192 3 ปีที่แล้ว +6

    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.

  • @shwetachavan751
    @shwetachavan751 7 หลายเดือนก่อน

    Thank You so much for the tutorial. It helped me alot understanding the game. I am glad that i found this channel.

  • @sylv8639
    @sylv8639 3 ปีที่แล้ว +2

    This is a great explanation, now I'm going to try and add MinMax algorithm to it.

  • @tiranielsen
    @tiranielsen 2 ปีที่แล้ว +1

    Thank you so much for doing this lesson. It is easy to follow and understand as a beginner :)

  • @edrobinson8248
    @edrobinson8248 ปีที่แล้ว

    Very good teacher. Thanks.

  • @ilich650
    @ilich650 2 ปีที่แล้ว +1

    Thank you for a great educational lesson! 👍

  • @saurabhtalele1537
    @saurabhtalele1537 3 ปีที่แล้ว +3

    Brilliant sir

  •  2 ปีที่แล้ว +1

    Excellent videos! But why the computer keep playing one last chance, if I have already won the game? How I could correct that?

  • @simpleguy2557
    @simpleguy2557 2 ปีที่แล้ว

    sir you are the best

  • @VishalRana-ix9ry
    @VishalRana-ix9ry 3 ปีที่แล้ว +2

    Thanks for this 🔥

  • @calppiso1466
    @calppiso1466 2 ปีที่แล้ว

    Thank you!

  • @thedrunkmonkshow
    @thedrunkmonkshow ปีที่แล้ว

    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#. 😊

    • @thedrunkmonkshow
      @thedrunkmonkshow ปีที่แล้ว

      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! 😄

  • @jamalmas
    @jamalmas 3 ปีที่แล้ว +1

    Hello! Thanks for your very helpful videos. What about the private ones?

  • @allenchi818
    @allenchi818 ปีที่แล้ว

    Anyone got an infinite loop in a draw situation?

  • @mishalfarooq6708
    @mishalfarooq6708 ปีที่แล้ว

    Plz help Sara ho gaya end se or operator ni lg rha 🥲

  • @kian7671
    @kian7671 2 ปีที่แล้ว

    do with design plss