Google Snake

Drinking games with the Google AJAX API

I forgot how old I was a few days ago. After resorting to working it out from my date of birth and deciding I was defiantly twenty two I was left with an uneasy feeling that I should really have known how long I had existed, after all I was there for most of it.

This is just another example of all those things that Google do better than me. I noticed from the time honoured tweaks to their logo that they've been celebrating their ninth birthday recently. Somehow that got me meandering around the web, looking at some of the things that Google has spawned in the past nine years that it never meant to. Google's mission is to "organize the world's information and make it universally accessible and useful" and while it's been doing that it's also provided a platform for infinitely varied and unique ideas and applications, one of which I happened to stumble across being the rules of the Google snake game.

Its very simple really, the idea is to create a phrase by having each player add one word at a time. The first person to make a phrase that returns zero results from Google is the loser and has to slug another pint of flaming Guinness and weed-killer.

Google snake game goes here

Happy Birthday Google

-sam

Have it

Download the script and put in on your own bit of the interwang. You'll need to get your own Google API key.

googlesnake.js (Download)

You will need to include the Google AJAX script and my GoogleSnake script on your page. Then just make a new instance of GoogleSnakeGame, passing a DOM element to the constructor, like this:
var e = document.getElementById('game');
new GoogleSnakeGame(e);