using System; using HelpMethods; namespace Test { internal class Program { static void Main(string[] args) { string pokemonName = "Чармандер" , elementType = "Огонь"; byte level = 1; short hp = 95; GetInfo(pokemonName, elementType, level, hp); CreatePassport(); } /// /// Метод для задания №1. /// /// /// /// /// static void GetInfo(string name, string elType, byte lvl, short hp) { const sbyte margine = -10; string message = $@" ====== INFO ====== {"Pokemon:",margine}{name} {"Element:",margine}{elType} {"Level:",margine}{lvl} | HP: {hp} ==================== "; Console.WriteLine(message); SystemHelp.Waiting(); } /// /// Методы для задания №2. /// static void CreatePassport() { SetValues(); static void SetValues() { byte maxStringLength = 20; Console.Write("Fill out the forms.\t[20 chars]\n\nTrainer name: "); string trainerName = StringHelp.CutString(Console.ReadLine(), maxStringLength); Console.Write("Pokemon name: "); string pokemonName = StringHelp.CutString(Console.ReadLine(), maxStringLength); Console.Write("Element type: "); string elementType = StringHelp.CutString(Console.ReadLine(), maxStringLength); Console.Write("Region name: "); string regionName = StringHelp.CutString(Console.ReadLine(), maxStringLength); PrintPassport(trainerName, pokemonName, elementType, regionName); } static void PrintPassport(string trainer, string pokemon, string element, string region) { const sbyte margine1 = -9 , margine2 = -11; string message = $@" ************************************************************* POKEMON'S PASSPORT {"Trainer:",margine1}{trainer}{" (Region:",margine2}{region}) {"Pokemon:",margine1}{pokemon}{" (Element:",margine2}{element}) ************************************************************* "; Console.WriteLine(message); } } } }