Stuff tagged as 'javascript'

2014-03-20 - Tic Tac Toe in JavaScript, Part 3 (final version)

In the last post I added a couple of basic strategies to my Tic Tac Toe game that made it less than totally stupid, but still not too hard to beat. If you play that game a few times you'll likely identify a few holes in its logic - tactics you can use to repeatedly beat the computer. In this final version, I've added four more strategies that - I think - prevent the human player from ever winning and take every opportunity given to win. If you can beat the game with all the strategies enabled, please tell me how. Here are the final four strategies. Full source code is at the bottom as a Gist.

2014-03-16 - Tic Tac Toe in JavaScript, Part 2

In the last post I introduced a Tic Tac Toe game with computer player implemented as a single HTML file. The game in that post was a proof of concept, with the computer player just randomly selecting a blank square for its turn.

2014-03-13 - Tic Tac Toe in JavaScript, Part 1

My latest project is a Tic Tac Toe game implemented as a single HTML file with embedded CSS and JavaScript. Creating the game board that updates during play was fairly trivial. The fun part is that the computer plays against you.

2014-03-01 - A Graph Paper SVG Drawing App

This is a simple graph paper drawing app implemented in JavaScript and SVG. The idea came to me while planning out large structures in Minecraft. I've always wanted to learn about coding SVG in the browser and this was a fun way to do that. In addition to jQuery, of course, it uses:

2014-01-24 - A palindrome test function in JavaScript

We gave this test at some dev interviews today: write a function that returns true if the word passed to it is a palindrome (the same backwards as forwards) or false if not.

2014-01-24 - Browser-based crossword puzzle implemented in JavaScript

This is a browser-based crossword puzzle game implemented completely in JavaScript. I wrote this sometime last summer. Some of its features:

Blog Search

Some Tags

Programming Is Fun

This is a blog about programming for the sheer joy of it. More...

Contact
github.com/wiseley
twitter.com/mattwiseley