I’ve been trying to make Tic Tac Toe game for almost a month. I’ve looked at others code and found this one and modified it a bit but it still doesen’t work. When I click on the first tile it says ‘game overX’ and when I click on the other tiles it doesen’t respond. I know that the problem is in this line:
board[move.i][move.j] = aiPlayer; but I don’t understand where.
And also is there another way to do this because I don’t understand also the
._maxBy because I found this code online and I want to learn it so later I can change it and implement my own. PLEASE HELP!
Here is the link: https://codepen.io/Teo03/pen/NwWKVm