Tic-tac-toe issues

Hello once again. Like I mentioned in my last post, I’m trying to get the legacy front-end certification. I’m only missing the tic-tac-toe game at this point, but it’s going really badly.

The main game logic is finished, but what concerns me is the algorithm.

For some reason, when there is a corner move available, the thing just goes nuts and tries to play every move, and then goes into an infinite loop.

My project is below:

can you describe how to see this in action?

Sure. Just follow the sequence below:

  1. Choose to play as x
  2. Open the console
  3. Play on literally any square
  4. The thing gets stuck for a few seconds
  5. When it gets unstuck, the algorith goes nuts (both on the board and the console)

Or, alternativetly, just choose to play as O and see what the algorithm comes up with

Please. It’s been 3 months and I still cant find the issue

I don’t see the behaviour you described

the only bug I see is that if you fill the board a tie it does’t recognise the tie

Oh yeah, i forgot to update the reproduction steps (as i did make some fixes, but the main issue still there)

  1. Play as X
  2. Play the Middle square
  3. Play any of the side squares next to the middle square

The algorith will play multiple times

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.