diff --git a/works/lab-05/lesson5/.gitignore b/works/lab-05/lesson5/.gitignore new file mode 100644 index 0000000..add57be --- /dev/null +++ b/works/lab-05/lesson5/.gitignore @@ -0,0 +1,5 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ \ No newline at end of file diff --git a/works/lab-05/lesson5/lesson5.sln b/works/lab-05/lesson5/lesson5.sln new file mode 100644 index 0000000..2677907 --- /dev/null +++ b/works/lab-05/lesson5/lesson5.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lesson5", "lesson5\lesson5.csproj", "{E404E34B-B3E7-4B5D-BDBA-FF48D27C2B5B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E404E34B-B3E7-4B5D-BDBA-FF48D27C2B5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E404E34B-B3E7-4B5D-BDBA-FF48D27C2B5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E404E34B-B3E7-4B5D-BDBA-FF48D27C2B5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E404E34B-B3E7-4B5D-BDBA-FF48D27C2B5B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/works/lab-05/lesson5/lesson5/Program.cs b/works/lab-05/lesson5/lesson5/Program.cs new file mode 100644 index 0000000..35cd761 --- /dev/null +++ b/works/lab-05/lesson5/lesson5/Program.cs @@ -0,0 +1,34 @@ +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) + { + pokemonHP += 80; + } + + static void Main() + { + Console.WriteLine("=== ПОКЕЦЕНТР: ЛЕЧЕНИЕ ==="); + int pokemonHP = 20; + Console.WriteLine($"Здоровье до лечения: {pokemonHP} HP."); + HealPokemon(ref pokemonHP); + Console.WriteLine($"[Покецентр] Покемон полностью здоров! Восстановлено 80 HP."); + Console.WriteLine($"Здоровье после лечения: {pokemonHP} HP.\n"); + + + + } + + +} + + + + diff --git a/works/lab-05/lesson5/lesson5/lesson5.csproj b/works/lab-05/lesson5/lesson5/lesson5.csproj new file mode 100644 index 0000000..6c1dc92 --- /dev/null +++ b/works/lab-05/lesson5/lesson5/lesson5.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + +