refactored game selection code and final result display code