This would be neat as an OpenSocial app. You can run it through our Hawkee container to come up with a high score rank with your friends. Here is an example, http://www.hawkee.com/snippet/4818/ - Just create an XML document containing your code and paste the URL into the Test Script box. You can even store the scores on our database.