Обновленние-добавление

This commit is contained in:
ArhaNge1
2026-10-21 15:39:13 +03:00
parent efb41a5d8a
commit ebd04219c5
34 changed files with 35543 additions and 36 deletions
+16
View File
@@ -0,0 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lol", "lol\lol.csproj", "{8A527AAD-A846-404D-8FD5-3AD6BAFF66A9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8A527AAD-A846-404D-8FD5-3AD6BAFF66A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A527AAD-A846-404D-8FD5-3AD6BAFF66A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A527AAD-A846-404D-8FD5-3AD6BAFF66A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A527AAD-A846-404D-8FD5-3AD6BAFF66A9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
+62
View File
@@ -0,0 +1,62 @@
using System;
namespace ConsoleApp1
{
public class Pokemon: Pokemons
{
protected static string name;
protected static int level;
protected int hp;
public string Name
{
get => name;
set => name = string.IsNullOrWhiteSpace(value) ? "Я хуй знает что за покемон!" : value;
}
public int Level
{
get => level;
set => level = value < 1 ? 1 : value;
}
public int Hp
{
get => Hp;
set => hp = value < 1 ? 1 : value;
}
public Pokemon(string name, int level, int hp)
{
Name = name;
Level = level;
Hp = hp;
}
public virtual void Attaka()
{
Console.WriteLine($"{Name},(Ур. {Level}:)");
}
}
public class Pokemons
{
public virtual void Attack()
{
Console.WriteLine($"{Name} атакует как-то непонятно.");
}
}
public class Pikachu : Pokemons
{
public override void Attack()
{
Console.WriteLine($"{Name} бьёт током! Пика-пика!");
}
}
public class Squirtle : Pokemons
{
public override void Attack()
{
Console.WriteLine($"{Name} стреляет водой! Сквирт-сквирт!");
}
}
}
+10
View File
@@ -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>