generated from admin/template
did lesson5
This commit is contained in:
@@ -1,29 +1,62 @@
|
|||||||
class TestClass
|
class TestClass
|
||||||
{
|
{
|
||||||
static void SearchBushes(out string foundPokemon, out int pokemonLevel)
|
|
||||||
{
|
|
||||||
Random rdn = new Random();
|
|
||||||
pokemonLevel = rdn.Next(16);
|
|
||||||
foundPokemon = "Пикачу";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void HealPokemon(ref int pokemonHP)
|
static void HealPokemon(ref int pokemonHP)
|
||||||
{
|
{
|
||||||
pokemonHP += 80;
|
pokemonHP += 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SearchBushes(out string foundPokemon, out int pokemonLevel)
|
||||||
|
{
|
||||||
|
var rand = new Random();
|
||||||
|
foundPokemon = "Пикачу";
|
||||||
|
pokemonLevel = rand.Next(16);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void RegisterTournament(in double difficulty, params string[] participants)
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int i = 0; i < participants.Length; i++)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"* {participants[i]}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
Console.WriteLine("=== ПОКЕЦЕНТР: ЛЕЧЕНИЕ ===");
|
/*Console.WriteLine("=== ПОКЕЦЕНТР: ЛЕЧЕНИЕ ===");
|
||||||
int pokemonHP = 20;
|
int pokemonHP = 20;
|
||||||
Console.WriteLine($"Здоровье до лечения: {pokemonHP} HP.");
|
Console.WriteLine($"Здоровье до лечения: {pokemonHP} HP.");
|
||||||
HealPokemon(ref pokemonHP);
|
HealPokemon(ref pokemonHP);
|
||||||
Console.WriteLine($"[Покецентр] Покемон полностью здоров! Восстановлено 80 HP.");
|
Console.WriteLine($"[Покецентр] Покемон полностью здоров! Восстановлено 80 HP.");
|
||||||
Console.WriteLine($"Здоровье после лечения: {pokemonHP} HP.\n");
|
Console.WriteLine($"Здоровье после лечения: {pokemonHP} HP.\n");*/
|
||||||
|
|
||||||
|
|
||||||
|
/*SearchBushes(out string foundPokemon, out int pokemonLevel);
|
||||||
|
Console.WriteLine("=== ИССЛЕДОВАНИЕ ЛОКАЦИИ ===");
|
||||||
|
Console.WriteLine("Вы зашли в высокую траву...");
|
||||||
|
Console.WriteLine($"Шорох! Из кустов появляется дикий {foundPokemon} (Уровень: {pokemonLevel})!");*/
|
||||||
|
Console.WriteLine("=== РЕГИСТРАЦИЯ НА ТУРНИР ===");
|
||||||
|
double stadionDifficulti = 1.5;
|
||||||
|
Console.WriteLine($"Коэффициент стадиона: {stadionDifficulti}");
|
||||||
|
Console.WriteLine("Список участников:");
|
||||||
|
RegisterTournament(in stadionDifficulti, "Бульбазавр", "Чармандер" );
|
||||||
|
Console.WriteLine("-----------------------------");
|
||||||
|
Console.WriteLine($"Коэффициент стадиона: {stadionDifficulti}");
|
||||||
|
Console.WriteLine("Список участников:");
|
||||||
|
RegisterTournament(in stadionDifficulti, "Сквиртл", "Пикачу","Псайдак", "Мяут");
|
||||||
|
Console.WriteLine("=============================");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user