Consolidate game logic in game.js
merge