generated from admin/template
new
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
class Pokemon
|
||||
{
|
||||
public string Name;
|
||||
public int Level;
|
||||
public int HP;
|
||||
|
||||
|
||||
public int HP
|
||||
{
|
||||
get { return hp; }
|
||||
set
|
||||
{
|
||||
if (value < 0) hp = 0;
|
||||
else if (value > 100) hp = 100;
|
||||
else hp = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Pikachu : Pokemon
|
||||
{
|
||||
public Pikachu(string name, int level) : base(name, level)
|
||||
{
|
||||
// тут можно добавить что-то своё
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("=== ТУРНИР: ВСЕ ПРОТИВ ВСЕХ ===");
|
||||
|
||||
abstract class Pokemon
|
||||
{
|
||||
public abstract void Attack();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>lab_07</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lab-07", "lab-07.csproj", "{02EF9EE4-CC3D-4279-AFAC-6CC4CA6BC983}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{02EF9EE4-CC3D-4279-AFAC-6CC4CA6BC983}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02EF9EE4-CC3D-4279-AFAC-6CC4CA6BC983}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02EF9EE4-CC3D-4279-AFAC-6CC4CA6BC983}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02EF9EE4-CC3D-4279-AFAC-6CC4CA6BC983}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user