A few months ago I decided I needed to get good at Javascript and I figured a good way to get good was to make a working Tic Tac Toe game. Some of my co-workers are much smarter than I am and they helped me out a lot along the way explaining fundamental principles and helping me understand the massive amounts of math involved in seemingly simple tasks. After a lot of frustration and a lot of learning I have a working Tic Tac Toe game. It’s not perfect, it’s only one player and the computer is not intelligent it just picks a random open square and doesn’t know if one of the open squares will win the game. The computer won’t block you either, I should probably get on that…
It’s based on jQuery because using a Javascript library that allows you to traverse the DOM using selectors similar to CSS seemed like a good idea to me. I was surprised at how much actual Javascript I had to write even tough I was using a library as robust as jQuery. I figured I’d put this up as a work in progress, I’m pretty proud of it since until now all I’ve ever done is straight, static CSS & XHTML.
Check it out and leave a comment if you like it because I like comments.
That’s jSweet! I was jBeaten by the jComputer. It will jRue this jDay!
This is rad, reminds me of the rock paper scissors game I made before the world got me down.
I should read your blog more often, maybe it will make me finish mine.