Сделал lesson2

This commit is contained in:
328p
2026-09-22 15:22:01 +03:00
parent 439af04813
commit 34a82be9c4
4 changed files with 43 additions and 15 deletions
-7
View File
@@ -1,7 +0,0 @@
{
"sdk": {
"version": "9.0.0",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}
+5 -5
View File
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lesson2", "lesson2\lesson2.csproj", "{478B1AA0-6B34-4B03-841D-E68F3D9D5EEB}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lesson2", "lesson2\lesson2.csproj", "{E95F59AF-823D-49EC-9B6A-9DCC770FF0D2}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -8,9 +8,9 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{478B1AA0-6B34-4B03-841D-E68F3D9D5EEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E95F59AF-823D-49EC-9B6A-9DCC770FF0D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{478B1AA0-6B34-4B03-841D-E68F3D9D5EEB}.Debug|Any CPU.Build.0 = Debug|Any CPU {E95F59AF-823D-49EC-9B6A-9DCC770FF0D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{478B1AA0-6B34-4B03-841D-E68F3D9D5EEB}.Release|Any CPU.ActiveCfg = Release|Any CPU {E95F59AF-823D-49EC-9B6A-9DCC770FF0D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{478B1AA0-6B34-4B03-841D-E68F3D9D5EEB}.Release|Any CPU.Build.0 = Release|Any CPU {E95F59AF-823D-49EC-9B6A-9DCC770FF0D2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal
+37 -2
View File
@@ -1,5 +1,5 @@
// See https://aka.ms/new-console-template for more information // See https://aka.ms/new-console-template for more information
/*
Console.WriteLine("=== Прокачка покемона ==="); Console.WriteLine("=== Прокачка покемона ===");
Console.Write("Введите базовое значение атаки покемона: "); Console.Write("Введите базовое значение атаки покемона: ");
int baseAttack = int.Parse(Console.ReadLine()); int baseAttack = int.Parse(Console.ReadLine());
@@ -31,4 +31,39 @@ int endCost = beginBalance - (amountPotions * costPotion);
Console.WriteLine($"Успешная покупка! Баланс: {endCost}"); Console.WriteLine($"Успешная покупка! Баланс: {endCost}");*/
/*Console.Write("Введите hp: ");
int hp = int.Parse(Console.ReadLine());
if(hp <= 0){Console.WriteLine("Покемон потерял сознание! Верните его в покебол.");}
else if (hp is >= 1 and <= 20){Console.WriteLine("Критическое состояние! Срочно используйте зелье!");}
else if (hp is >= 21 and <= 50)
{
Console.WriteLine("Покемон ранен, будьте осторожны.");
}
else {Console.WriteLine("Покемон полон сил и готов к бою!");}*/
Console.WriteLine("1 — Атака\n" + "2 — Инвентарь\n" + "3 — Сменить покемона\n" + "4 — Побег\n");
Console.WriteLine("Введите номер действия: ");
int numberAction = int.Parse(Console.ReadLine());
switch (numberAction)
{
case 1:
Console.WriteLine("Покемон наносит быстрый удар!");
break;
case 2:
Console.WriteLine("Вы открыли сумку и применили Зелье Лечения.");
break;
case 3:
Console.WriteLine("Вы отозвали покемона и выпустили нового!");
break;
case 4:
Console.WriteLine("Вы успешно сбежали из боя!");
break;
default:
Console.WriteLine("Неизвестная команда! Вы пропустили ход.");
break;
}
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>