Looking good!
Nice implementation of minimax ![]()
I also like that you have X and O take turns of who goes first.
I love the glowing effect of the yellow highlighting.
I see you have a similar problem to mine, using minimax gets a bit slow on a 5x5 board and there is a big delay when you click. It doesn’t show the player move until the compute move has been calculated and then it shows both. This is something I also need to fix in my implementation.
When I choose my symbol at the beginning it’s not highlighted when I click it, it would be nice to indicate what I’ve chosen
In my own implementation I made the win length equal to the board size (5x5 is 5 in a row to win) but when I search now I notice most make it less, as you have done… I did base mine off of this 3d tictactoe which is 4x4x4 and win length is 4.
In wikipedia it does say “One can play on a board of 4x4 squares, winning in several ways. Winning can include: 4 in a straight line, 4 in a diagonal line, 4 in a diamond, or 4 to make a square.” wiki but there are all sorts of variations.
I’m just wondering what rationale you are following for win length?
I did run across some buggy games:
It would be nice if I could see what difficulty I’m playing on.
I’ll do some more testing to see what else fails like this. Overall great work though.
I’m also looking for feedback on my own tic tac toe game: https://forum.freecodecamp.org/t/multi-dimensional-tic-tac-toe/756046

