Tic Tac Toe in JavaScript

Tic Tac Toe

Update: this project has since been re-written in React. The original code is still on GitHub, mostly for posterity.

Yay, I made a game.

It's Tic Tac Toe for two players, and was mostly for JavaScript practice (with a tiny bit of jQuery) so it runs purely in the browser.

Tricky parts were figuring out how to access particular spots on the board (which is made of three arrays nested within an array that needed to be looped through), writing the function to check for a tie at the end of the game, and the process of discovering that the .addClass and .removeClass jQuery methods don't work on pseudo classes.

If I'd had more time, it might've been fun to make an AI player so you could play against the computer.

You can play it at http://negomi.github.io/tic-tac-toe/ or see the code here.