TIC TAC TOE, cool fade-ins

4 Likes

Way better than mine. A+.

1 Like

Great job! This is really cool.

1 Like

This is beautiful! The design, animation, everything is great.

1 Like

I love the look. The animations make it feel very dynamic. The AI seems vulnerable to corner trapping, though I’m not sure if that’s by design or not.

Just in case, here’s a classic paper outlining a tic tac toe algorithm: http://digitalcollections.library.cmu.edu/awweb/awarchive?type=file&item=43379
Page 6 discusses corner trapping.

Score keeping is a fun touch as well.

3 Likes

thanks you all, I will ad an “invincible mode” button in the future))

I really love what you’ve done with this project. The design and animation is really great.

it looks great. There’s a little bug though when the computer wins in the last turn it registers it as a tie. Don’t know if that happens as well if you win in the last move.

thanks for the testing. I will look into this bug

i cant reproduce it, if the computer. wins it it displayed as such. i let it win 6x

Tested it again, and bug is still there. The computer (or the player) needs to to win at the very last turn (as in the 9th turn) as shown in the image(didn’t edit it, only deleted the tie popup, but you ca see the score).

1 Like

You are great, thanks, I get, …, I am fixen it!))

  if (x_player.ans || o_player.ans) {
    game.state = {rc: 3, res: "won", player: o_player.ans ? "o" : 'x'};
   return;   // I FORGOT THIS RETURN
}
if (is_tie()) {
    game.state = {rc: 3, res: "tie"};
}

Forgot a return statement, yeah, it falls through and the state is “RESET” to a tie, if all boxes are filled on the last turn

YOU ARE A FANTASTIC TESTER!!!