Пример #1
0
        private static int GetMapId()
        {
            DisplayChooseMap();
            var readLine = Console.ReadLine();

            int mapId;

            while (!int.TryParse(readLine, out mapId))
            {
                DisplayChooseMap();
                readLine = Console.ReadLine();
            }

            Console.WriteLine($"Chosen map: {MetaDataHelper.GetMapNameById(CurrentMapId)}");

            return(mapId);
        }