Game state resets when escape pressed, fixed do-while loop in main