game.js structure rework