diff --git a/ProjectStormtrooper/ProjectStormtrooper/EntityStormtrooper.cs b/ProjectStormtrooper/ProjectStormtrooper/EntityStormtrooper.cs
new file mode 100644
index 0000000..db8b03c
--- /dev/null
+++ b/ProjectStormtrooper/ProjectStormtrooper/EntityStormtrooper.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing.Drawing2D;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ProjectStormtrooper
+{
+ internal class EntityStormtrooper
+ {
+ ///
+ /// Скорость
+ ///
+ 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 Rockets { get; private set; }
+ ///
+ /// Признак (опция) наличия бомб
+ ///
+ public bool Bombs { get; private set; }
+ ///
+ /// Шаг перемещения
+ ///
+ public double Step => (double)Speed * 100 / Weight;
+ ///
+ /// Инициализация полей объекта-класса штурмовика
+ ///
+ /// Скорость
+ /// Вес
+ /// Основной цвет
+ /// Дополнительный цвет
+ /// Признак наличия ракет
+ /// Признак наличия бомб
+ public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool rockets, bool bombs)
+ {
+ Speed = speed;
+ Weight = weight;
+ BodyColor = bodyColor;
+ AdditionalColor = additionalColor;
+ Rockets = rockets;
+ Bombs = bombs;
+ }
+ }
+}
diff --git a/ProjectStormtrooper/ProjectStormtrooper/Form1.Designer.cs b/ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.Designer.cs
similarity index 78%
rename from ProjectStormtrooper/ProjectStormtrooper/Form1.Designer.cs
rename to ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.Designer.cs
index 68d6185..3f4e1cb 100644
--- a/ProjectStormtrooper/ProjectStormtrooper/Form1.Designer.cs
+++ b/ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.Designer.cs
@@ -1,6 +1,6 @@
namespace ProjectStormtrooper
{
- partial class Form1
+ partial class FormStormtrooper
{
///
/// Required designer variable.
@@ -28,10 +28,10 @@
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 450);
- this.Text = "Form1";
+ components = new System.ComponentModel.Container();
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(800, 450);
+ Text = "Form1";
}
#endregion
diff --git a/ProjectStormtrooper/ProjectStormtrooper/Form1.cs b/ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.cs
similarity index 54%
rename from ProjectStormtrooper/ProjectStormtrooper/Form1.cs
rename to ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.cs
index 638b855..88ddd10 100644
--- a/ProjectStormtrooper/ProjectStormtrooper/Form1.cs
+++ b/ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.cs
@@ -1,8 +1,8 @@
namespace ProjectStormtrooper
{
- public partial class Form1 : Form
+ public partial class FormStormtrooper : Form
{
- public Form1()
+ public FormStormtrooper()
{
InitializeComponent();
}
diff --git a/ProjectStormtrooper/ProjectStormtrooper/Form1.resx b/ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.resx
similarity index 93%
rename from ProjectStormtrooper/ProjectStormtrooper/Form1.resx
rename to ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.resx
index 1af7de1..a395bff 100644
--- a/ProjectStormtrooper/ProjectStormtrooper/Form1.resx
+++ b/ProjectStormtrooper/ProjectStormtrooper/FormStormtrooper.resx
@@ -1,24 +1,24 @@
-
diff --git a/ProjectStormtrooper/ProjectStormtrooper/Program.cs b/ProjectStormtrooper/ProjectStormtrooper/Program.cs
index 763f0aa..3db6e41 100644
--- a/ProjectStormtrooper/ProjectStormtrooper/Program.cs
+++ b/ProjectStormtrooper/ProjectStormtrooper/Program.cs
@@ -11,7 +11,7 @@ namespace ProjectStormtrooper
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
- Application.Run(new Form1());
+ Application.Run(new FormStormtrooper());
}
}
}
\ No newline at end of file