Tic Tac Toe: Can you beat the MCP? (Tron reference..)

It’s alive! Please let me know if you manage to beat it. I had some friends play test it and I think I’ve gotten the ai to an unbeatable level. (OK, it is beatable actually but still pretty tough).

Really fun project. :+1: Got to practice some flexbox, grid, CSS transitions on top of all the JS fun.

The layout also works on mobile.

1 Like

AI seems to work with the testing I did. One thing I noticed, is there no way to switch from X to O between games. Once you have picked one you are stuck with that character for all following games. The other thing I noticed, is that when I pick O for my character, the computer does not play first as is normal in tic tac toe. The X player always makes the first move in tic tac toe.

Thanks for the feedback. :beers:

It’s funny, I left the ability to change from X to O but a couple of friends said they didn’t want to change so I removed it. I could re-implement it.

I didn’t realize the X moves first rule. I’ll have to build that into game. Thanks for playing!

OK, code updated so that Xs go first. You can also switch characters after a game ends.