From 33d663adfeafe86bc32f82f8cf430fee8d390391 Mon Sep 17 00:00:00 2001 From: Samecoins <146867889+Samecoins@users.noreply.github.com> Date: Mon, 1 Apr 2024 09:54:35 +0400 Subject: [PATCH 1/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=80=D0=BE=D0=B4=D0=B8=D1=82=D0=B8=D0=BB?= =?UTF-8?q?=D0=B5=D0=B9=20=D0=B8=20=D0=B2=D0=B2=D0=BE=D0=B4=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=81=D1=80=D1=83=D0=BA=D1=82=D0=BE=D1=80=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => Drawnings}/DirectionType.cs | 2 +- .../Drawnings/DrawningDumpTruck.cs | 63 ++++++++++ .../DrawningTruck.cs} | 116 ++++++++---------- .../{ => Entities}/EntityDumpTruck.cs | 37 +----- .../ProjectDumpTruck/Entities/EntityTruck.cs | 41 +++++++ .../FormTransport.Designer.cs | 18 ++- .../ProjectDumpTruck/FormTransport.cs | 68 ++++++---- 7 files changed, 224 insertions(+), 121 deletions(-) rename ProjectDumpTruck/ProjectDumpTruck/{ => Drawnings}/DirectionType.cs (92%) create mode 100644 ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs rename ProjectDumpTruck/ProjectDumpTruck/{DrawningDumpTruck.cs => Drawnings/DrawningTruck.cs} (60%) rename ProjectDumpTruck/ProjectDumpTruck/{ => Entities}/EntityDumpTruck.cs (59%) create mode 100644 ProjectDumpTruck/ProjectDumpTruck/Entities/EntityTruck.cs diff --git a/ProjectDumpTruck/ProjectDumpTruck/DirectionType.cs b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DirectionType.cs similarity index 92% rename from ProjectDumpTruck/ProjectDumpTruck/DirectionType.cs rename to ProjectDumpTruck/ProjectDumpTruck/Drawnings/DirectionType.cs index a3eb262..db03f68 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/DirectionType.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DirectionType.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace ProjectDumpTruck; +namespace ProjectDumpTruck.Drawnings; /// /// Направление перемещения diff --git a/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs new file mode 100644 index 0000000..76fd95f --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ProjectDumpTruck.Entities; + +namespace ProjectDumpTruck.Drawnings; + +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningDumpTruck : DrawningTruck +{ + /// + /// Консруктор + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия кузова + /// Признак наличия тента + + public DrawningDumpTruck(int speed, double weight, Color bodyColor, Color additionalColor, bool bodywork, bool awning) : base(130, 90) + { + EntityTruck = new EntityDumpTruck(speed, weight, bodyColor, additionalColor, bodywork, awning); + } + + public override void DrawTransport(Graphics g) + { + if (EntityTruck == null || EntityTruck is not EntityDumpTruck dumpTruck || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + + Pen pen = new(Color.Black); + Brush additionalBrush = new SolidBrush(dumpTruck.AdditionalColor); + Brush border = new SolidBrush(Color.Black); + + //Отрисовка кузова + if (dumpTruck.Bodywork) + { + g.FillRectangle(additionalBrush, _startPosX.Value, _startPosY.Value, 90, 35); + } + + _startPosX += 10; + _startPosY += 20; + base.DrawTransport(g); + _startPosX -= 10; + _startPosY -= 20; + + + //Отрисовка тента + if (dumpTruck.Bodywork & dumpTruck.Awning) + { + g.FillRectangle(border, _startPosX.Value, _startPosY.Value, 95, 10); + g.FillRectangle(border, _startPosX.Value, _startPosY.Value, 95, 3); + g.FillRectangle(border, _startPosX.Value + 30, _startPosY.Value, 3, 40); + g.FillRectangle(border, _startPosX.Value + 70, _startPosY.Value, 3, 40); + } + } +} \ No newline at end of file diff --git a/ProjectDumpTruck/ProjectDumpTruck/DrawningDumpTruck.cs b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningTruck.cs similarity index 60% rename from ProjectDumpTruck/ProjectDumpTruck/DrawningDumpTruck.cs rename to ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningTruck.cs index b955b72..e999ab5 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/DrawningDumpTruck.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningTruck.cs @@ -1,20 +1,18 @@ -using System; +using ProjectDumpTruck.Entities; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace ProjectDumpTruck; +namespace ProjectDumpTruck.Drawnings; -/// -/// Класс, отвечающий за прорисовку и перемещение объекта-сущности -/// -public class DrawningDumpTruck +public class DrawningTruck { /// /// Класс-сущность /// - public EntityDumpTruck? EntityDumpTruck { get; private set; } + public EntityTruck? EntityTruck { get; protected set; } /// /// Ширина окна @@ -29,48 +27,58 @@ public class DrawningDumpTruck /// /// Левая координата прорисовки самосвала /// - private int? _startPosX; + protected int? _startPosX; /// /// Верхняя координата прорисовки самосвала /// - private int? _startPosY; + protected int? _startPosY; /// /// Ширина прорисовки самосвала /// - private readonly int _drawningDumpTruckWidth = 130; + private readonly int _drawningDumpTruckWidth = 90; /// /// Высота прорисовки самосвала /// - private readonly int _drawningDumpTruckHeight = 90; - - + private readonly int _drawningDumpTruckHeight = 50; /// - /// Инициализация свойств + /// Конструктор /// /// Скорость /// Вес /// Основной цвет - /// Дополнительный цвет - /// Признак наличия кузова - /// Признак наличия тента - - public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodywork, bool awning) + /// + /// Пустой конструктор + /// + private DrawningTruck() { - EntityDumpTruck = new EntityDumpTruck(); - EntityDumpTruck.Init(speed, weight, bodyColor, additionalColor, bodywork, awning); _pictureWidth = null; _pictureHeight = null; _startPosX = null; _startPosY = null; + } + public DrawningTruck(int speed, double weight, Color bodyColor) : this() + { + EntityTruck = new EntityTruck(speed, weight, bodyColor); + } + /// + /// Конструктор для наследников + /// + /// Ширина прорисовки самосвала + /// Высота прорисовки самосвала + protected DrawningTruck(int drawningDumpTruckWidth, int drawningDumpTruckHeight) : this() + { + _drawningDumpTruckWidth = drawningDumpTruckWidth; + _pictureHeight = drawningDumpTruckHeight; + } /// /// Установка границ поля @@ -90,7 +98,7 @@ public class DrawningDumpTruck _pictureWidth = width; _pictureHeight = height; - if (_startPosX.HasValue && _startPosX.Value + _drawningDumpTruckWidth > _pictureWidth) + if (_startPosX.HasValue && _startPosX.Value + _drawningDumpTruckWidth > _pictureWidth) { _startPosX = _pictureWidth - _drawningDumpTruckWidth; } @@ -145,7 +153,7 @@ public class DrawningDumpTruck /// true - перемещение выполнено, false - перемещение невозможно public bool MoveTransport(DirectionType direction) { - if (EntityDumpTruck == null || !_startPosX.HasValue || !_startPosY.HasValue) + if (EntityTruck == null || !_startPosX.HasValue || !_startPosY.HasValue) { return false; } @@ -154,33 +162,33 @@ public class DrawningDumpTruck { //влево case DirectionType.Left: - if (_startPosX.Value - EntityDumpTruck.Step > 0) + if (_startPosX.Value - EntityTruck.Step > 0) { - _startPosX -= (int)EntityDumpTruck.Step; + _startPosX -= (int)EntityTruck.Step; } return true; //вверх case DirectionType.Up: - if (_startPosY.Value - EntityDumpTruck.Step > 0) + if (_startPosY.Value - EntityTruck.Step > 0) { - _startPosY -= (int)EntityDumpTruck.Step; + _startPosY -= (int)EntityTruck.Step; } return true; //вправо case DirectionType.Right: - if (_startPosX.Value + EntityDumpTruck.Step + _drawningDumpTruckWidth < _pictureWidth) + if (_startPosX.Value + EntityTruck.Step + _drawningDumpTruckWidth < _pictureWidth) { - _startPosX += (int)EntityDumpTruck.Step; + _startPosX += (int)EntityTruck.Step; } return true; //вниз case DirectionType.Down: - if (_startPosY.Value + EntityDumpTruck.Step + _drawningDumpTruckHeight < _pictureHeight) + if (_startPosY.Value + EntityTruck.Step + _drawningDumpTruckHeight < _pictureHeight) { - _startPosY += (int)EntityDumpTruck.Step; + _startPosY += (int)EntityTruck.Step; } return true; default: @@ -189,49 +197,33 @@ public class DrawningDumpTruck } - public void DrawTransport(Graphics g) + public virtual void DrawTransport(Graphics g) { - if (EntityDumpTruck == null || !_startPosX.HasValue || !_startPosY.HasValue) + if (EntityTruck == null || !_startPosX.HasValue || !_startPosY.HasValue) { return; } Pen pen = new(Color.Black); - Brush additionalBrush = new SolidBrush(EntityDumpTruck.AdditionalColor); //Отрисовка основы (кабины водителя и днища) - Brush body = new SolidBrush(EntityDumpTruck.BodyColor); - g.FillRectangle(body, _startPosX.Value + 100, _startPosY.Value, 30, 35); - g.FillRectangle(body, _startPosX.Value, _startPosY.Value + 40, 130, 20); + Brush body = new SolidBrush(EntityTruck.BodyColor); + g.FillRectangle(body, _startPosX.Value + 60, _startPosY.Value + 5, 20, 20); // Уменьшенная кабина + g.FillRectangle(body, _startPosX.Value, _startPosY.Value + 25, 90, 15); // Уменьшенное днище //Отрисовка колёс Brush wheels = new SolidBrush(Color.Gray); - g.FillEllipse(wheels, _startPosX.Value, _startPosY.Value + 60, 30, 30); - g.FillEllipse(wheels, _startPosX.Value + 30, _startPosY.Value + 60, 30, 30); - g.FillEllipse(wheels, _startPosX.Value + 100, _startPosY.Value + 60, 30, 30); + g.FillEllipse(wheels, _startPosX.Value + 5, _startPosY.Value + 35, 20, 20); // Уменьшенные колеса + g.FillEllipse(wheels, _startPosX.Value + 35, _startPosY.Value + 35, 20, 20); + g.FillEllipse(wheels, _startPosX.Value + 65, _startPosY.Value + 35, 20, 20); + //Отрисовка границ Brush border = new SolidBrush(Color.Black); - g.DrawRectangle(pen, _startPosX.Value + 100, _startPosY.Value, 30, 35); - g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 40, 130, 20); - g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 60, 30, 30); - g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 60, 30, 30); - g.DrawEllipse(pen, _startPosX.Value + 100, _startPosY.Value + 60, 30, 30); - - //Отрисовка кузова - if (EntityDumpTruck.Bodywork) - { - g.FillRectangle(additionalBrush, _startPosX.Value, _startPosY.Value, 90, 35); - } - - //Отрисовка тента - if (EntityDumpTruck.Bodywork & EntityDumpTruck.Awning) - { - g.FillRectangle(border, _startPosX.Value, _startPosY.Value, 95, 10); - g.FillRectangle(border, _startPosX.Value, _startPosY.Value, 95, 3); - g.FillRectangle(border, _startPosX.Value + 30, _startPosY.Value, 3, 40); - g.FillRectangle(border, _startPosX.Value + 70, _startPosY.Value, 3, 40); - } + g.DrawRectangle(pen, _startPosX.Value + 60, _startPosY.Value + 5, 20, 20); // Граница кабины + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 25, 90, 15); // Граница днища + g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 35, 20, 20); // Границы колёс + g.DrawEllipse(pen, _startPosX.Value + 35, _startPosY.Value + 35, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 65, _startPosY.Value + 35, 20, 20); } - -} \ No newline at end of file +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/EntityDumpTruck.cs b/ProjectDumpTruck/ProjectDumpTruck/Entities/EntityDumpTruck.cs similarity index 59% rename from ProjectDumpTruck/ProjectDumpTruck/EntityDumpTruck.cs rename to ProjectDumpTruck/ProjectDumpTruck/Entities/EntityDumpTruck.cs index edf756f..02bca18 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/EntityDumpTruck.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/Entities/EntityDumpTruck.cs @@ -1,31 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ProjectDumpTruck; +namespace ProjectDumpTruck.Entities; /// /// Класс-сущность "Самосвал" /// -public class EntityDumpTruck +public class EntityDumpTruck : EntityTruck { - /// - /// Скорость - /// - public int Speed { get; private set; } - - /// - /// Вес - /// - public double Weight { get; private set; } - - /// - /// Основной цвет - /// - public Color BodyColor { get; private set; } - /// /// Дополнительный цвет (для опциональных элементов) /// @@ -41,11 +20,6 @@ public class EntityDumpTruck /// public bool Awning { get; private set; } - /// - /// Шаг перемещения самосвала - /// - public double Step => Speed * 100 / Weight; - /// /// Инициализация полей объекта-класса самосвала /// @@ -56,15 +30,10 @@ public class EntityDumpTruck /// Признак наличия кузова /// Признак наличия тента - public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodywork, bool awning) + public EntityDumpTruck(int speed, double weight, Color bodyColor, Color additionalColor, bool bodywork, bool awning) : base(speed, weight, bodyColor) { - Speed = speed; - Weight = weight; - BodyColor = bodyColor; AdditionalColor = additionalColor; Bodywork = bodywork; Awning = awning; } - - } \ No newline at end of file diff --git a/ProjectDumpTruck/ProjectDumpTruck/Entities/EntityTruck.cs b/ProjectDumpTruck/ProjectDumpTruck/Entities/EntityTruck.cs new file mode 100644 index 0000000..f385560 --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/Entities/EntityTruck.cs @@ -0,0 +1,41 @@ +/// +/// Класс-сущность "Тележка" +/// +namespace ProjectDumpTruck.Entities; + +public class EntityTruck +{ + /// + /// Скорость + /// + public int Speed { get; private set; } + + /// + /// Вес + /// + public double Weight { get; private set; } + + /// + /// Основной цвет + /// + public Color BodyColor { get; private set; } + + /// + /// Шаг перемещения самосвала + /// + public double Step => Speed * 100 / Weight; + + /// + /// Конструктор сущности + /// + /// Скорость + /// Вес + /// Основной цвет + + public EntityTruck(int speed, double weight, Color bodyColor) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + } +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs index f0f09de..db87b56 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs @@ -34,6 +34,7 @@ buttonDown = new Button(); buttonRight = new Button(); buttonCreateDumpTruck = new Button(); + buttonCreateTruck = new Button(); ((System.ComponentModel.ISupportInitialize)pictureBoxDumpTruck).BeginInit(); SuspendLayout(); // @@ -99,17 +100,29 @@ buttonCreateDumpTruck.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonCreateDumpTruck.Location = new Point(12, 498); buttonCreateDumpTruck.Name = "buttonCreateDumpTruck"; - buttonCreateDumpTruck.Size = new Size(75, 23); + buttonCreateDumpTruck.Size = new Size(117, 23); buttonCreateDumpTruck.TabIndex = 5; - buttonCreateDumpTruck.Text = "Создать"; + buttonCreateDumpTruck.Text = "Создать самосвал"; buttonCreateDumpTruck.UseVisualStyleBackColor = true; buttonCreateDumpTruck.Click += ButtonCreateDumpTruck_Click; // + // buttonCreateTruck + // + buttonCreateTruck.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreateTruck.Location = new Point(135, 498); + buttonCreateTruck.Name = "buttonCreateTruck"; + buttonCreateTruck.Size = new Size(117, 23); + buttonCreateTruck.TabIndex = 6; + buttonCreateTruck.Text = "Создать тележка"; + buttonCreateTruck.UseVisualStyleBackColor = true; + buttonCreateTruck.Click += ButtonCreateTruck_Click; + // // FormTransport // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1017, 533); + Controls.Add(buttonCreateTruck); Controls.Add(buttonCreateDumpTruck); Controls.Add(buttonRight); Controls.Add(buttonDown); @@ -130,5 +143,6 @@ private Button buttonDown; private Button buttonRight; private Button buttonCreateDumpTruck; + private Button buttonCreateTruck; } } \ No newline at end of file diff --git a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs index e196619..f96dd24 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using ProjectDumpTruck.Drawnings; /// /// Форма работы с объектом "Самосвал" @@ -18,7 +19,7 @@ namespace ProjectDumpTruck /// /// Поле-объект для прорисовки объекта /// - private DrawningDumpTruck? _drawningDumpTruck; + private DrawningTruck? _drawningTruck; /// /// Конструктор формы @@ -33,36 +34,58 @@ namespace ProjectDumpTruck /// private void Draw() { - if (_drawningDumpTruck == null) + if (_drawningTruck == null) { return; } Bitmap bmp = new(pictureBoxDumpTruck.Width, pictureBoxDumpTruck.Height); Graphics gr = Graphics.FromImage(bmp); - _drawningDumpTruck.DrawTransport(gr); + _drawningTruck.DrawTransport(gr); pictureBoxDumpTruck.Image = bmp; } /// - /// Обработка нажатия кнопки "Создать" + /// Создание объекта класса-перемещения + /// + /// Тип создаваемого объекта + private void CreateObject(string type) + { + Random random = new(); + switch (type) + { + case nameof(DrawningTruck): + _drawningTruck = new DrawningTruck(random.Next(100, 300), random.Next(1000, 3000), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256))); + break; + case nameof(DrawningDumpTruck): + _drawningTruck = new DrawningDumpTruck(random.Next(100, 300), random.Next(1000, 3000), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2))); + break; + default: + return; + } + + _drawningTruck.SetPictureSize(pictureBoxDumpTruck.Width, pictureBoxDumpTruck.Height); + _drawningTruck.SetPosition(random.Next(10, 100), random.Next(10, 100)); + Draw(); + } + + /// + /// Обработка нажатия кнопки "Создать самосвал" /// /// /// - private void ButtonCreateDumpTruck_Click(object sender, EventArgs e) - { - Random random = new(); - _drawningDumpTruck = new DrawningDumpTruck(); - _drawningDumpTruck.Init(random.Next(100, 300), random.Next(1000, 3000), - Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), - Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), - Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2))); + private void ButtonCreateDumpTruck_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningDumpTruck)); - _drawningDumpTruck.SetPictureSize(pictureBoxDumpTruck.Width, pictureBoxDumpTruck.Height); - _drawningDumpTruck.SetPosition(random.Next(10, 100), random.Next(10, 100)); - - Draw(); - } + /// + /// Обработка нажатия кнопки "Создать тележка" + /// + /// + /// + private void ButtonCreateTruck_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningTruck)); /// /// Перемещение объекта по форме (нажатие кнопок навигации) @@ -71,7 +94,7 @@ namespace ProjectDumpTruck /// private void ButtonMove_Click(object sender, EventArgs e) { - if (_drawningDumpTruck == null) + if (_drawningTruck == null) { return; } @@ -82,16 +105,16 @@ namespace ProjectDumpTruck switch (name) { case "buttonUp": - result = _drawningDumpTruck.MoveTransport(DirectionType.Up); + result = _drawningTruck.MoveTransport(DirectionType.Up); break; case "buttonDown": - result = _drawningDumpTruck.MoveTransport(DirectionType.Down); + result = _drawningTruck.MoveTransport(DirectionType.Down); break; case "buttonLeft": - result = _drawningDumpTruck.MoveTransport(DirectionType.Left); + result = _drawningTruck.MoveTransport(DirectionType.Left); break; case "buttonRight": - result = _drawningDumpTruck.MoveTransport(DirectionType.Right); + result = _drawningTruck.MoveTransport(DirectionType.Right); break; } if (result) @@ -100,5 +123,6 @@ namespace ProjectDumpTruck } } + } } -- 2.25.1 From a18f6a44106d27eef002ec7ac463baa67a737b8e Mon Sep 17 00:00:00 2001 From: Samecoins Date: Mon, 1 Apr 2024 15:06:18 +0400 Subject: [PATCH 2/2] =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Drawnings/DirectionType.cs | 5 + .../Drawnings/DrawningDumpTruck.cs | 8 +- .../Drawnings/DrawningTruck.cs | 52 +++++-- .../FormTransport.Designer.cs | 26 ++++ .../ProjectDumpTruck/FormTransport.cs | 51 +++++++ .../MovementStrategy/AbstractStrategy.cs | 137 ++++++++++++++++++ .../MovementStrategy/IMoveableObjects.cs | 30 ++++ .../MovementStrategy/MoveToBorder.cs | 53 +++++++ .../MovementStrategy/MoveToCenter.cs | 57 ++++++++ .../MovementStrategy/MoveableTruck.cs | 70 +++++++++ .../MovementStrategy/MovementDirection.cs | 27 ++++ .../MovementStrategy/ObjectParameters.cs | 72 +++++++++ .../MovementStrategy/StrategyStatus.cs | 19 +++ 13 files changed, 587 insertions(+), 20 deletions(-) create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/AbstractStrategy.cs create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/IMoveableObjects.cs create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToBorder.cs create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToCenter.cs create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveableTruck.cs create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MovementDirection.cs create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/ObjectParameters.cs create mode 100644 ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/StrategyStatus.cs diff --git a/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DirectionType.cs b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DirectionType.cs index db03f68..f4cc92d 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DirectionType.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DirectionType.cs @@ -11,6 +11,11 @@ namespace ProjectDumpTruck.Drawnings; /// public enum DirectionType { + /// + /// Неизвестное направление + /// + Unknow = -1, + /// /// Вверх /// diff --git a/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs index 76fd95f..602ba45 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningDumpTruck.cs @@ -44,11 +44,11 @@ public class DrawningDumpTruck : DrawningTruck g.FillRectangle(additionalBrush, _startPosX.Value, _startPosY.Value, 90, 35); } - _startPosX += 10; - _startPosY += 20; + _startPosX += 0; + _startPosY += 0; base.DrawTransport(g); - _startPosX -= 10; - _startPosY -= 20; + _startPosX -= 0; + _startPosY -= 0; //Отрисовка тента diff --git a/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningTruck.cs b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningTruck.cs index e999ab5..c44e305 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningTruck.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/Drawnings/DrawningTruck.cs @@ -37,19 +37,32 @@ public class DrawningTruck /// /// Ширина прорисовки самосвала /// - private readonly int _drawningDumpTruckWidth = 90; + private readonly int _drawningDumpTruckWidth = 130; /// /// Высота прорисовки самосвала /// - private readonly int _drawningDumpTruckHeight = 50; + private readonly int _drawningDumpTruckHeight = 90; + + // + /// Координата X объекта + /// + public int? GetPosX => _startPosX; /// - /// Конструктор + /// Координата Y объекта /// - /// Скорость - /// Вес - /// Основной цвет + public int? GetPosY => _startPosY; + + /// + /// Ширина объекта + /// + public int GetWidth => _drawningDumpTruckWidth; + + /// + /// Высота объекта + /// + public int GetHeight => _drawningDumpTruckHeight; /// /// Пустой конструктор @@ -63,6 +76,13 @@ public class DrawningTruck } + /// + /// Конструктор + /// + /// Скорость + /// Вес + /// Основной цвет + public DrawningTruck(int speed, double weight, Color bodyColor) : this() { EntityTruck = new EntityTruck(speed, weight, bodyColor); @@ -208,22 +228,22 @@ public class DrawningTruck //Отрисовка основы (кабины водителя и днища) Brush body = new SolidBrush(EntityTruck.BodyColor); - g.FillRectangle(body, _startPosX.Value + 60, _startPosY.Value + 5, 20, 20); // Уменьшенная кабина - g.FillRectangle(body, _startPosX.Value, _startPosY.Value + 25, 90, 15); // Уменьшенное днище + g.FillRectangle(body, _startPosX.Value + 100, _startPosY.Value, 30, 35); + g.FillRectangle(body, _startPosX.Value, _startPosY.Value + 40, 130, 20); //Отрисовка колёс Brush wheels = new SolidBrush(Color.Gray); - g.FillEllipse(wheels, _startPosX.Value + 5, _startPosY.Value + 35, 20, 20); // Уменьшенные колеса - g.FillEllipse(wheels, _startPosX.Value + 35, _startPosY.Value + 35, 20, 20); - g.FillEllipse(wheels, _startPosX.Value + 65, _startPosY.Value + 35, 20, 20); + g.FillEllipse(wheels, _startPosX.Value, _startPosY.Value + 60, 30, 30); + g.FillEllipse(wheels, _startPosX.Value + 30, _startPosY.Value + 60, 30, 30); + g.FillEllipse(wheels, _startPosX.Value + 100, _startPosY.Value + 60, 30, 30); //Отрисовка границ Brush border = new SolidBrush(Color.Black); - g.DrawRectangle(pen, _startPosX.Value + 60, _startPosY.Value + 5, 20, 20); // Граница кабины - g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 25, 90, 15); // Граница днища - g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 35, 20, 20); // Границы колёс - g.DrawEllipse(pen, _startPosX.Value + 35, _startPosY.Value + 35, 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 65, _startPosY.Value + 35, 20, 20); + g.DrawRectangle(pen, _startPosX.Value + 100, _startPosY.Value, 30, 35); + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 40, 130, 20); + g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 60, 30, 30); + g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 60, 30, 30); + g.DrawEllipse(pen, _startPosX.Value + 100, _startPosY.Value + 60, 30, 30); } } diff --git a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs index db87b56..8c0e52b 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.Designer.cs @@ -35,6 +35,8 @@ buttonRight = new Button(); buttonCreateDumpTruck = new Button(); buttonCreateTruck = new Button(); + comboBoxStrategy = new ComboBox(); + buttonStrategyStep = new Button(); ((System.ComponentModel.ISupportInitialize)pictureBoxDumpTruck).BeginInit(); SuspendLayout(); // @@ -117,11 +119,33 @@ buttonCreateTruck.UseVisualStyleBackColor = true; buttonCreateTruck.Click += ButtonCreateTruck_Click; // + // comboBoxStrategy + // + comboBoxStrategy.DropDownStyle = ComboBoxStyle.DropDownList; + comboBoxStrategy.FormattingEnabled = true; + comboBoxStrategy.Items.AddRange(new object[] { "К центру", "К границе поля" }); + comboBoxStrategy.Location = new Point(884, 12); + comboBoxStrategy.Name = "comboBoxStrategy"; + comboBoxStrategy.Size = new Size(121, 23); + comboBoxStrategy.TabIndex = 7; + // + // buttonStrategyStep + // + buttonStrategyStep.Location = new Point(930, 41); + buttonStrategyStep.Name = "buttonStrategyStep"; + buttonStrategyStep.Size = new Size(75, 23); + buttonStrategyStep.TabIndex = 8; + buttonStrategyStep.Text = "Шаг"; + buttonStrategyStep.UseVisualStyleBackColor = true; + buttonStrategyStep.Click += ButtonStrategyStep_Click; + // // FormTransport // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1017, 533); + Controls.Add(buttonStrategyStep); + Controls.Add(comboBoxStrategy); Controls.Add(buttonCreateTruck); Controls.Add(buttonCreateDumpTruck); Controls.Add(buttonRight); @@ -144,5 +168,7 @@ private Button buttonRight; private Button buttonCreateDumpTruck; private Button buttonCreateTruck; + private ComboBox comboBoxStrategy; + private Button buttonStrategyStep; } } \ No newline at end of file diff --git a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs index f96dd24..b01aede 100644 --- a/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs +++ b/ProjectDumpTruck/ProjectDumpTruck/FormTransport.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using ProjectDumpTruck.Drawnings; +using ProjectDumpTruck.MovementStrategy; /// /// Форма работы с объектом "Самосвал" @@ -21,12 +22,18 @@ namespace ProjectDumpTruck /// private DrawningTruck? _drawningTruck; + /// + /// + /// + private AbstractStrategy? _strategy; + /// /// Конструктор формы /// public FormTransport() { InitializeComponent(); + _strategy = null; } /// @@ -70,6 +77,8 @@ namespace ProjectDumpTruck _drawningTruck.SetPictureSize(pictureBoxDumpTruck.Width, pictureBoxDumpTruck.Height); _drawningTruck.SetPosition(random.Next(10, 100), random.Next(10, 100)); + _strategy = null; + comboBoxStrategy.Enabled = true; Draw(); } @@ -124,5 +133,47 @@ namespace ProjectDumpTruck } + /// + /// + /// + /// + /// + private void ButtonStrategyStep_Click(object sender, EventArgs e) + { + if (_drawningTruck == null) + { + return; + } + + if (comboBoxStrategy.Enabled) + { + _strategy = comboBoxStrategy.SelectedIndex switch + { + 0 => new MoveToCenter(), + 1 => new MoveToBorder(), + _ => null, + }; + if (_strategy == null) + { + return; + } + _strategy.SetData(new MoveableTruck(_drawningTruck), pictureBoxDumpTruck.Width, pictureBoxDumpTruck.Height); + } + + if (_strategy == null) + { + return; + } + + comboBoxStrategy.Enabled = false; + _strategy.MakeStep(); + Draw(); + + if (_strategy.GetStatus() == StrategyStatus.Finish) + { + comboBoxStrategy.Enabled = true; + _strategy = null; + } + } } } diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/AbstractStrategy.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/AbstractStrategy.cs new file mode 100644 index 0000000..e1c43a1 --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/AbstractStrategy.cs @@ -0,0 +1,137 @@ +namespace ProjectDumpTruck.MovementStrategy; + +/// +/// Класс-стратегия перемещения объекта +/// +public abstract class AbstractStrategy +{ + /// * + /// Перемещаемый объект + /// + private IMoveableObject? _moveableObject; + + /// + /// Статус перемещения + /// + private StrategyStatus _state = StrategyStatus.NotInit; + + /// + /// Ширина поля + /// + protected int FieldWidth { get; private set; } + + /// + /// Высота поля + /// + protected int FieldHeight { get; private set; } + + /// + /// Статус перемещения + /// + public StrategyStatus GetStatus() { return _state; } + + /// + /// Установка данных + /// + /// Перемещаемый объект + /// Ширина поля + /// Высота поля + public void SetData(IMoveableObject moveableObject, int width, int height) + { + if (moveableObject == null) + { + _state = StrategyStatus.NotInit; + return; + } + + _state = StrategyStatus.InProgress; + _moveableObject = moveableObject; + FieldWidth = width; + FieldHeight = height; + } + + /// + /// Шаг перемещения + /// + public void MakeStep() + { + if (_state != StrategyStatus.InProgress) + { + return; + } + if (IsTargetDestinaion()) + { + _state = StrategyStatus.Finish; + return; + } + MoveToTarget(); + } + + /// + /// Перемещение влево + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveLeft() => MoveTo(MovementDirection.Left); + + /// + /// Перемещение вправо + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveRight() => MoveTo(MovementDirection.Right); + + /// + /// Перемещение вверх + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveUp() => MoveTo(MovementDirection.Up); + + /// + /// Перемещение вниз + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveDown() => MoveTo(MovementDirection.Down); + + /// + /// Параметры объекта + /// + protected ObjectParameters? GetObjectParameters => _moveableObject?.GetObjectPosition; + + /// + /// Шаг объекта + /// + /// + protected int? GetStep() + { + if (_state != StrategyStatus.InProgress) + { + return null; + } + return _moveableObject?.GetStep; + } + + /// + /// Перемещение к цели + /// + protected abstract void MoveToTarget(); + + /// + /// Достигнута ли цель + /// + /// + protected abstract bool IsTargetDestinaion(); + + /// + /// Попытка перемещения в требуемом направлении + /// + /// Направление + /// Результат попытки (true - удалось переместиться, false - неудача) + private bool MoveTo(MovementDirection movementDirection) + { + if (_state != StrategyStatus.InProgress) + { + return false; + } + + return _moveableObject?.TryMoveObject(movementDirection) ?? false; + } +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/IMoveableObjects.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/IMoveableObjects.cs new file mode 100644 index 0000000..c1f17b5 --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/IMoveableObjects.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectDumpTruck.MovementStrategy; + +/// +/// Интерфейс для работы с перемещаемым объектом +/// +public interface IMoveableObject +{ + /// + /// Получение координаты X объекта + /// + ObjectParameters? GetObjectPosition { get; } + + /// + /// Шаг объекта + /// + int GetStep { get; } + + /// + /// Попытка переместить объект в указанном направлении + /// + /// Направление + /// true - объект перемещен, false - перемещение невозможно + bool TryMoveObject(MovementDirection direction); +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToBorder.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToBorder.cs new file mode 100644 index 0000000..c428d1b --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToBorder.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectDumpTruck.MovementStrategy; + +public class MoveToBorder : AbstractStrategy +{ + protected override bool IsTargetDestinaion() + { + if (GetObjectParameters == null) + { + return false; + } + return GetObjectParameters.RightBorder <= FieldWidth && + GetObjectParameters.RightBorder + GetStep() >= FieldWidth && + GetObjectParameters.DownBorder <= FieldHeight && + GetObjectParameters.DownBorder + GetStep() >= FieldHeight; + } + + protected override void MoveToTarget() + { + if (GetObjectParameters == null) + { + return; + } + if (Math.Abs(GetObjectParameters.ObjectMiddleHorizontal - FieldWidth) > GetStep()) + { + if (GetObjectParameters.ObjectMiddleHorizontal - FieldWidth > 0) + { + MoveLeft(); + } + else + { + MoveRight(); + } + + } + if (Math.Abs(GetObjectParameters.ObjectMiddleVertical - FieldHeight) > GetStep()) + { + if (GetObjectParameters.ObjectMiddleVertical - FieldHeight > 0) + { + MoveUp(); + } + else + { + MoveDown(); + } + } + } +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToCenter.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToCenter.cs new file mode 100644 index 0000000..a87eab5 --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveToCenter.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectDumpTruck.MovementStrategy; + +public class MoveToCenter : AbstractStrategy +{ + protected override bool IsTargetDestinaion() + { + ObjectParameters? objParams = GetObjectParameters; + if (objParams == null) + { + return false; + } + return objParams.ObjectMiddleHorizontal <= FieldWidth / 2 && + objParams.ObjectMiddleHorizontal + GetStep() >= FieldWidth / 2 && + objParams.ObjectMiddleVertical <= FieldHeight / 2 && + objParams.ObjectMiddleVertical + GetStep() >= FieldHeight / 2; + } + + protected override void MoveToTarget() + { + ObjectParameters? objParams = GetObjectParameters; + if (objParams == null) + { + return; + } + int diffX = objParams.ObjectMiddleHorizontal - FieldWidth / 2; + if (Math.Abs(diffX) > GetStep()) + { + if (diffX > 0) + { + MoveLeft(); + } + else + { + MoveRight(); + } + + } + int diffY = objParams.ObjectMiddleVertical - FieldHeight / 2; + if (Math.Abs(diffY) > GetStep()) + { + if (diffY > 0) + { + MoveUp(); + } + else + { + MoveDown(); + } + } + } +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveableTruck.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveableTruck.cs new file mode 100644 index 0000000..ab5dfe5 --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MoveableTruck.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ProjectDumpTruck.Drawnings; + +namespace ProjectDumpTruck.MovementStrategy; + +/// +/// Класс-реализация IMoveableObject с использованием DrawningTruck +/// +public class MoveableTruck : IMoveableObject +{ + /// + /// Поле-объект класса DrawningShip или его наследника + /// + private readonly DrawningTruck? _truck = null; + + /// + /// Конструктор + /// + /// + public MoveableTruck(DrawningTruck truck) + { + _truck = truck; + } + + public ObjectParameters? GetObjectPosition + { + get + { + if (_truck == null || _truck.EntityTruck == null || !_truck.GetPosX.HasValue || !_truck.GetPosY.HasValue) + { + return null; + } + + return new ObjectParameters(_truck.GetPosX.Value, _truck.GetPosY.Value, _truck.GetWidth, _truck.GetHeight); + } + } + + public int GetStep => (int)(_truck?.EntityTruck?.Step ?? 0); + + public bool TryMoveObject(MovementDirection direction) + { + if (_truck == null || _truck.EntityTruck == null) + { + return false; + } + + return _truck.MoveTransport(GetDirectionType(direction)); + } + + /// + /// Конвертация из MovementDirection в DirectionType + /// + /// MovementDirection + /// DirectionType + private static DirectionType GetDirectionType(MovementDirection direction) + { + return direction switch + { + MovementDirection.Left => DirectionType.Left, + MovementDirection.Right => DirectionType.Right, + MovementDirection.Up => DirectionType.Up, + MovementDirection.Down => DirectionType.Down, + _ => DirectionType.Unknow, + }; + } +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MovementDirection.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MovementDirection.cs new file mode 100644 index 0000000..89a9215 --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/MovementDirection.cs @@ -0,0 +1,27 @@ +namespace ProjectDumpTruck.MovementStrategy; + +/// +/// Направление перемещения +/// +public enum MovementDirection +{ + /// + /// Вверх + /// + Up = 1, + + /// + /// Вниз + /// + Down = 2, + + /// + /// Влево + /// + Left = 3, + + /// + /// Вправо + /// + Right = 4 +} \ No newline at end of file diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/ObjectParameters.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/ObjectParameters.cs new file mode 100644 index 0000000..538c06b --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/ObjectParameters.cs @@ -0,0 +1,72 @@ +namespace ProjectDumpTruck.MovementStrategy; + +/// +/// Параметры-координат объекта +/// +public class ObjectParameters +{ + /// + /// Координата X + /// + private readonly int _x; + + /// + /// Координата Y + /// + private readonly int _y; + + /// + /// Ширина объекта + /// + private readonly int _width; + + /// + /// Высота объекта + /// + private readonly int _height; + + /// + /// Левая граница + /// + public int LeftBorder => _x; + + /// + /// Верхняя граница + /// + public int TopBorder => _y; + + /// + /// Правая граница + /// + public int RightBorder => _x + _width; + + /// + /// Нижняя граница + /// + public int DownBorder => _y + _height; + + /// + /// Середина объекта + /// + public int ObjectMiddleHorizontal => _x + _width / 2; + + /// + /// Середина объекта + /// + public int ObjectMiddleVertical => _y + _height / 2; + + /// + /// Конструктор + /// + /// Координата X + /// Координата Y + /// Ширина + /// Высота + public ObjectParameters(int x, int y, int width, int height) + { + _x = x; + _y = y; + _width = width; + _height = height; + } +} diff --git a/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/StrategyStatus.cs b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/StrategyStatus.cs new file mode 100644 index 0000000..26629f9 --- /dev/null +++ b/ProjectDumpTruck/ProjectDumpTruck/MovementStrategy/StrategyStatus.cs @@ -0,0 +1,19 @@ +namespace ProjectDumpTruck.MovementStrategy; + +public enum StrategyStatus +{ + ///