finished converting game.js to CLI