reduce nestedness of runGame loop