Further refactor main.rb into game.rb