move wormhole logic into game.js