function GameStateController(state) { this.state = state; this.collider = new SimpleCollider(state); } GameStateController.prototype.update = function() { this.state.player.update(); this.collider.collide(); }