My unbeatable Tic Tac Toe game based on the movie WarGames

http://xcvfd.com/tictactoe/

This was a fun project. I was inspired by the movie WarGames to make an unbeatable and quirky AI.

Let me know what you think!
:grin:

5 Likes

That is beyond perfect!

2 Likes

Thank you! I worked hard on it!

1 Like

I see in your code, you return 1 to the setTimeout function for getting the text to type - but I can’t work out where this value is used. What’s this used for?

2 Likes

That’s actually an artifact left over from spending far too many post midnight hours on this. I think I was using that code somewhere else and having it return 1 (true) if something. But I can’t remember what now.

1 Like

Last move and final board is not displayed - after the last move should be some delay so user can see how the game ended.

3 Likes

I agree with @jenovs, also it doesn’t work for me on Firefox (windows 10). But seriously, super awesome!

2 Likes

Ah. I didn’t think anyone would be bothered by that. Thanks for the heads up.

1 Like

I made it so the last board screen stays visible and displays a line through it if the computer wins as per your suggestion. Thanks! @jenovs @BenGitter

2 Likes

Nice! BTW: any idea why the game isn’t working on Firefox (win10).

1 Like

Awesome! Wish I’d thought of this.

1 Like

So the issue was that I’m using some little CSS hacks to make everything responsive. I don’t use Firefox, so I didn’t know it was an issue. After playing with a few things I was able to fix it. It should work in Firefox now. Thanks for the heads up! @BenGitter

If you’re curious about the code, it’s on my github.

2 Likes

So cool, and it’s definitely unbeatable. One of my favorite FCC projects so far.

2 Likes