generated from admin/template
41 lines
1.7 KiB
C#
41 lines
1.7 KiB
C#
int pokemonHP = 20;
|
|
Console.WriteLine("=== ПОКЕЦЕНТР: ЛЕЧЕНИЕ ===");
|
|
Console.WriteLine($"Здоровье до лечения: {pokemonHP} HP.");
|
|
HealPokemon(ref pokemonHP);
|
|
|
|
Console.WriteLine($"Здоровье после лечения: {pokemonHP} HP.");
|
|
static void HealPokemon(ref int hp)
|
|
{
|
|
hp += 80;
|
|
Console.WriteLine("[Покецентр] Покемон полностью здоров! Восстановлено 80 HP.");
|
|
}
|
|
|
|
Console.WriteLine("=== ИССЛЕДОВАНИЕ ЛОКАЦИИ ===");
|
|
Console.WriteLine("Вы зашли в высокую траву...");
|
|
SearchBushes(out string foundPokemon, out int pokemonLevel);
|
|
Console.WriteLine($"Шорох! Из кустов появляется дикий {foundPokemon} (Уровень: {pokemonLevel})!");
|
|
static void SearchBushes(out string foundPokemon, out int pokemonLevel)
|
|
{
|
|
Random random = new Random();
|
|
foundPokemon = "Пикачу";
|
|
pokemonLevel = random.Next(1, 16);
|
|
}
|
|
|
|
Console.WriteLine("=== РЕГИСТРАЦИЯ НА ТУРНИР ===");
|
|
|
|
RegisterTournament(1.5, "Бульбазавр", "Чармандер");
|
|
RegisterTournament(1.5, "Сквиртл", "Пикачу", "Псайдак", "Мяут");
|
|
static void RegisterTournament(in double difficulty, params string[] participants)
|
|
{
|
|
|
|
|
|
Console.WriteLine("-----------------------------");
|
|
Console.WriteLine($"Коэффициент стадиона: {difficulty} ");
|
|
Console.WriteLine("Список участников: ");
|
|
|
|
foreach (string pokemon in participants)
|
|
{
|
|
Console.WriteLine($"* {pokemon} ");
|
|
}
|
|
}
|
|
Console.WriteLine("============================="); |