Tic Tac Toe with Clever CPU Opponent

Solution retrospective
I found it challenging to code the clever CPU move set. To get it working, I went with a brute force approach where the CPU checks rows, cols, and diagonals for moves to make, opponent's moves to block, and win requirements. I am curious if there is a more optimized way to do this.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Yashi-Singh-9
Hey in this i am unable to select X in initial phase and I am trying to reset the game but the game is not resetting. Also, in turn if the 0 turn it is displaying which is good but when it is x turn it is not showing it should show also! That's from my side and could you please provide the zip file for this challenge to me?
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord