JavaScript Tic Tac Toe Game Tutorial

Поделиться
HTML-код
  • Опубликовано: 30 янв 2025

Комментарии •

  • @AngleBrace
    @AngleBrace  3 года назад +3

    Which game should we create next?

    • @ncsgaming4093
      @ncsgaming4093 2 года назад +1

      home game light on and off or Math Game
      Thanks For Your Great Tutorial

    • @AngleBrace
      @AngleBrace  2 года назад

      @@ncsgaming4093 Thanks I will try my best

    • @manushreemallaraju2369
      @manushreemallaraju2369 2 года назад

      @Angle Brace Chessboard. Thanks for your easy and understandable tutorial.

  • @cyrilkariyawasam977
    @cyrilkariyawasam977 Год назад

    Thank you, very simple and easy to understand for beginners.

  • @aayushlamsal-i8e
    @aayushlamsal-i8e Год назад

    thank you brother....im a beginner and found your code very easy to understand....you makes me full clear

  • @manushreemallaraju2369
    @manushreemallaraju2369 2 года назад +5

    Hi @Angle Brace, I have searched so many other tutorials out there, which are very fancy and complicated. But I found your tutorial very helpful. As it finds easier for a beginner to understand and implement. Keep up the great work. 🤩

    • @AngleBrace
      @AngleBrace  2 года назад +1

      I am glad you liked it
      I can't thank you enough for your support

  • @Ajjones01
    @Ajjones01 2 года назад

    One of the simplest tutorials on RUclips. Thanks!

  • @fahmah72
    @fahmah72 3 года назад +1

    Great tutorial. Keep it up, brother 🖤

  • @nosh8172
    @nosh8172 2 года назад

    Thanks for the tutorial, really helpful, and you sound like a nice guy!

    • @AngleBrace
      @AngleBrace  2 года назад

      Thanks a lot it makes my day 💕

  • @Alex-dg3nc
    @Alex-dg3nc 2 года назад +1

    where did you learned coding bro.pls reply

  • @mustafasaid-ahmed9279
    @mustafasaid-ahmed9279 2 года назад +1

    I’m having trouble with the interactive part. Everything was fine until you hopped onto JavaScript. My webpage isn’t responsive(not showing x or o when I click on the cells)
    Any suggestions?

  • @aleyna5601
    @aleyna5601 2 года назад

    its not alerting winner when winner did the combination, its alterting after other player plays

  • @samu_8000
    @samu_8000 3 года назад

    Nice :)

  • @manushreemallaraju2369
    @manushreemallaraju2369 2 года назад +1

    Hello Everyone:
    Seems like after the player is won, the board still accepts the click events, so use the code below. See the comments with the code.
    let flag = false;
    checkForWinner = () => {
    if (check) {
    highlightCells(combination);
    flag = true; // make the flag true, if player has won.
    }
    }
    cells.forEach((cell) => {
    if (flag) { return } //if the player has won, then return..
    else {
    cell.innerHTML = currentPlayer;
    /**After each move we need to check for the winner.. */
    checkForWinner(); // before that create winning combinations..
    currentPlayer = currentPlayer == 'X' ? 'O' : 'X' /* allow to change the player type after inserting, should be prevented.. */
    }
    }

    • @AngleBrace
      @AngleBrace  2 года назад +1

      That's really helpful thanks for pointing out

    • @aleyna5601
      @aleyna5601 2 года назад

      it started to show every cell as X now