Move repeated logic from every main.js into game.js