generated from admin/template
Начал lesson5
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
bin/
|
||||||
|
obj/
|
||||||
|
/packages/
|
||||||
|
riderModule.iml
|
||||||
|
/_ReSharper.Caches/
|
||||||
@@ -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
|
||||||
@@ -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");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user