move logic in game.js to platformGameService.js