From 342a5b4f010245dbe4aa145a54b98b4167637cfd Mon Sep 17 00:00:00 2001 From: Mr-Sulfate Date: Sat, 15 Feb 2025 09:13:48 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D1=8C=D1=82?= =?UTF-8?q?=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- carCAR.sln | 22 ++++++++++++++++++ carCAR/Car.cs | 43 +++++++++++++++++++++++++++++++++++ carCAR/DirectionType.cs | 16 +++++++++++++ carCAR/DrawningSportcar.cs | 13 +++++++++++ carCAR/ProjectSportCar.csproj | 10 ++++++++ 5 files changed, 104 insertions(+) create mode 100644 carCAR.sln create mode 100644 carCAR/Car.cs create mode 100644 carCAR/DirectionType.cs create mode 100644 carCAR/DrawningSportcar.cs create mode 100644 carCAR/ProjectSportCar.csproj diff --git a/carCAR.sln b/carCAR.sln new file mode 100644 index 0000000..94af73b --- /dev/null +++ b/carCAR.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35506.116 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectSportCar", "carCAR\ProjectSportCar.csproj", "{EC7DC4ED-8873-4E6E-9D8E-34692629D7CF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EC7DC4ED-8873-4E6E-9D8E-34692629D7CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC7DC4ED-8873-4E6E-9D8E-34692629D7CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC7DC4ED-8873-4E6E-9D8E-34692629D7CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC7DC4ED-8873-4E6E-9D8E-34692629D7CF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/carCAR/Car.cs b/carCAR/Car.cs new file mode 100644 index 0000000..b0ff7af --- /dev/null +++ b/carCAR/Car.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectSportCar +{ + public class EntitySportcar + { + //скорость + public int Speed { get; private set; } + //вес + public double Weight { get; private set; } + // основной цвет + public Color BodyColor { get; private set; } + // дополнительный цвет + public Color AdditionalColor { get; private set; } + // Признак наличия обвеса + public bool BodyKit { get; private set; } + // Признак наличия антикрыла + public bool Wing { get; private set; } + // Признак наличия гоночной полосы + public bool SportLine { get; private set; } + // Шаг перемещения автомобиля + public double Step => Speed * 100 / Weight; + + public void Init(int speed, double weight, Color bodyColor, + Color additionalColor, bool bodyKit, bool wing, bool sportLine) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + BodyKit = bodyKit; + Wing = wing; + SportLine = sportLine; + } + + } +} diff --git a/carCAR/DirectionType.cs b/carCAR/DirectionType.cs new file mode 100644 index 0000000..e748850 --- /dev/null +++ b/carCAR/DirectionType.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectSportCar +{ + public enum DirectionType + { + Up =1, + Down =2, + Left =3, + Right =4 + } +} diff --git a/carCAR/DrawningSportcar.cs b/carCAR/DrawningSportcar.cs new file mode 100644 index 0000000..5a2528b --- /dev/null +++ b/carCAR/DrawningSportcar.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectSportCar +{ + public class DrawningSportcar + { + + } +} diff --git a/carCAR/ProjectSportCar.csproj b/carCAR/ProjectSportCar.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/carCAR/ProjectSportCar.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + +