Refactored game.coffee into a class.