redid the javascript game in coffeescript