made game.js shorter