Converted game.js to coffeescript