3D Tic-Tac-Toe with HTML5

I recently helped to organize a programming contest where you were required to write a Tic-tac-toe game using only HTML, CSS and JavaScript.  You then had to host your solution on jsFiddle.

I once saw someone do a 3D version of tic-tac-toe (back when I was still in high school) and I thought it would be a cool exercise to try this with HTML5.  This was the first time I’ve used the canvas element in HTML5 and I was really impressed.  It’s incredibly easy to use, but still incredibly powerful.  A really cool technology.

Since it uses HTML5 and specifically gradient textures the solution only really works in Chrome.  It’s usable in Firefox, but it doesn’t look nearly as nice.

It’s available here on jsFiddle.

I’m happy to say I managed to win the competition, but we didn’t get as many entries as we hoped for.