From 5673bdc34154b006399b5fb6485a3ceb4fc94c64 Mon Sep 17 00:00:00 2001
From: Kirill <39030726+Kirill3455@users.noreply.github.com>
Date: Wed, 3 Apr 2024 23:29:47 +0400
Subject: [PATCH] =?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=81=D1=82=D1=80=D0=B0=D1=82=D0=B5=D0=B3?=
=?UTF-8?q?=D0=B8=D0=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Drawnings/DirectionType.cs | 5 +
.../Drawnings/DrawningTrain.cs | 31 ++--
.../FormRoadTrain.Designer.cs | 26 ++++
.../ProjectRoadTrain/FormRoadTrain.cs | 66 +++++++--
.../MovementStrategy/AbstractStrategy.cs | 139 ++++++++++++++++++
.../MovementStrategy/IMoveableObject.cs | 24 +++
.../MovementStrategy/MoveToBorder.cs | 49 ++++++
.../MovementStrategy/MoveToCenter.cs | 54 +++++++
.../MovementStrategy/MoveableTrain.cs | 64 ++++++++
.../MovementStrategy/MovementDirection.cs | 27 ++++
.../MovementStrategy/ObjectParameters.cs | 72 +++++++++
.../MovementStrategy/StrategyStatus.cs | 22 +++
12 files changed, 559 insertions(+), 20 deletions(-)
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/AbstractStrategy.cs
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/IMoveableObject.cs
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToBorder.cs
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToCenter.cs
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveableTrain.cs
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MovementDirection.cs
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/ObjectParameters.cs
create mode 100644 ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/StrategyStatus.cs
diff --git a/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DirectionType.cs b/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DirectionType.cs
index 8e095c8..6244f59 100644
--- a/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DirectionType.cs
+++ b/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DirectionType.cs
@@ -2,6 +2,11 @@
public enum DirectionType
{
+ ///
+ /// Неизвестное навпрвление
+ ///
+ Unknow = -1,
+
///
/// Вверх
///
diff --git a/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DrawningTrain.cs b/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DrawningTrain.cs
index cec74f0..88c72d9 100644
--- a/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DrawningTrain.cs
+++ b/ProjectRoadTrain/ProjectRoadTrain/Drawnings/DrawningTrain.cs
@@ -34,16 +34,6 @@ public class DrawningTrain
///
protected int? _startPosY;
- ///
- /// Левая координата прорисовки автопоезда
- ///
- public int? GetPosX => _startPosX;
-
- ///
- /// Верхняя координата прорисовки автопоезда
- ///
- public int? GetPosY => _startPosY;
-
///
/// Ширина прорисовки автопоезда
///
@@ -54,6 +44,27 @@ public class DrawningTrain
///
private readonly int _drawningTrainHeight = 95;
+ ///
+ /// Координата X объекта
+ ///
+ public int? GetPosX => _startPosX;
+
+ ///
+ /// Координата Y объекта
+ ///
+ public int? GetPosY => _startPosY;
+
+ ///
+ /// Ширина объекта
+ ///
+ public int GetWidth => _drawningTrainWidth;
+
+ ///
+ /// Высота объекта
+ ///
+ public int GetHeight => _drawningTrainHeight;
+
+
///
/// Пустой конструктор
///
diff --git a/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.Designer.cs b/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.Designer.cs
index 5374cd1..6d5d6df 100644
--- a/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.Designer.cs
+++ b/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.Designer.cs
@@ -35,6 +35,8 @@
buttonLeft = new Button();
buttonRight = new Button();
buttonCreateTrain = new Button();
+ comboBoxStrategy = new ComboBox();
+ buttonStrategyStep = new Button();
((System.ComponentModel.ISupportInitialize)pictureBoxRoadTrain).BeginInit();
SuspendLayout();
//
@@ -117,11 +119,33 @@
buttonCreateTrain.UseVisualStyleBackColor = true;
buttonCreateTrain.Click += ButtonCreateTrain_Click;
//
+ // comboBoxStrategy
+ //
+ comboBoxStrategy.DropDownStyle = ComboBoxStyle.DropDownList;
+ comboBoxStrategy.FormattingEnabled = true;
+ comboBoxStrategy.Items.AddRange(new object[] { "К центру", "К краю" });
+ comboBoxStrategy.Location = new Point(667, 12);
+ comboBoxStrategy.Name = "comboBoxStrategy";
+ comboBoxStrategy.Size = new Size(121, 23);
+ comboBoxStrategy.TabIndex = 7;
+ //
+ // buttonStrategyStep
+ //
+ buttonStrategyStep.Location = new Point(713, 41);
+ buttonStrategyStep.Name = "buttonStrategyStep";
+ buttonStrategyStep.Size = new Size(75, 23);
+ buttonStrategyStep.TabIndex = 8;
+ buttonStrategyStep.Text = "Шаг";
+ buttonStrategyStep.UseVisualStyleBackColor = true;
+ buttonStrategyStep.Click += ButtonStrategyStep_Click;
+ //
// FormRoadTrain
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
+ Controls.Add(buttonStrategyStep);
+ Controls.Add(comboBoxStrategy);
Controls.Add(buttonCreateTrain);
Controls.Add(buttonRight);
Controls.Add(buttonLeft);
@@ -144,5 +168,7 @@
private Button buttonLeft;
private Button buttonRight;
private Button buttonCreateTrain;
+ private ComboBox comboBoxStrategy;
+ private Button buttonStrategyStep;
}
}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.cs b/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.cs
index e4c57fe..0f8d54c 100644
--- a/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.cs
+++ b/ProjectRoadTrain/ProjectRoadTrain/FormRoadTrain.cs
@@ -8,6 +8,7 @@
//using System.Threading.Tasks;
//using System.Windows.Forms;
using ProjectRoadTrain.Drawnings;
+using ProjectRoadTrain.MovementStrategy;
//using ProjectRoadTrain.MovementStrategy;
namespace ProjectRoadTrain;
@@ -21,10 +22,10 @@ public partial class FormRoadTrain : Form
///
private DrawningTrain? _drawningTrain;
- /////
- ///// Стратегия перемещения
- /////
- //private AbstractStrategy? _strategy;
+ ///
+ /// Стратегия перемещения
+ ///
+ private AbstractStrategy? _strategy;
///
@@ -33,7 +34,7 @@ public partial class FormRoadTrain : Form
public FormRoadTrain()
{
InitializeComponent();
- //_strategy = null;
+ _strategy = null;
}
///
@@ -58,25 +59,27 @@ public partial class FormRoadTrain : Form
///
///
private void CreateObject(string type)
- {
+ {
Random random = new();
switch (type)
{
case nameof(DrawningTrain):
_drawningTrain = new DrawningTrain(random.Next(100, 300), random.Next(1000, 3000),
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)));
- break;
+ break;
case nameof(DrawningRoadTrain):
_drawningTrain = new DrawningRoadTrain(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)));
+ Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
break;
- default :
+ default:
return;
}
_drawningTrain.SetPictureSize(pictureBoxRoadTrain.Width, pictureBoxRoadTrain.Height);
_drawningTrain.SetPosition(random.Next(10, 100), random.Next(10, 100));
+ _strategy = null;
+ comboBoxStrategy.Enabled = true;
Draw();
}
@@ -149,4 +152,47 @@ public partial class FormRoadTrain : Form
Draw();
}
}
-}
+
+ ///
+ /// Обработка нажатия кнопки "Шаг"
+ ///
+ ///
+ ///
+ private void ButtonStrategyStep_Click(object sender, EventArgs e)
+ {
+ if (_drawningTrain == null)
+ {
+ return;
+ }
+
+ if (comboBoxStrategy.Enabled)
+ {
+ _strategy = comboBoxStrategy.SelectedIndex switch
+ {
+ 0 => new MoveToCenter(),
+ 1 => new MoveToBorder(),
+ _ => null,
+ };
+ if (_strategy == null)
+ {
+ return;
+ }
+ _strategy.SetData(new MoveableCar(_drawningTrain), pictureBoxRoadTrain.Width, pictureBoxRoadTrain.Height);
+ }
+
+ if (_strategy == null)
+ {
+ return;
+ }
+
+ comboBoxStrategy.Enabled = false;
+ _strategy.MakeStep();
+ Draw();
+
+ if (_strategy.GetStatus() == StrategyStatus.Finish)
+ {
+ comboBoxStrategy.Enabled = true;
+ _strategy = null;
+ }
+ }
+}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/AbstractStrategy.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/AbstractStrategy.cs
new file mode 100644
index 0000000..afd5cb6
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/AbstractStrategy.cs
@@ -0,0 +1,139 @@
+namespace ProjectRoadTrain.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;
+ }
+}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/IMoveableObject.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/IMoveableObject.cs
new file mode 100644
index 0000000..6da0c25
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/IMoveableObject.cs
@@ -0,0 +1,24 @@
+namespace ProjectRoadTrain.MovementStrategy;
+
+///
+/// Интерфейс для работы с перемещаемым объектом
+///
+public interface IMoveableObject
+{
+ ///
+ /// Получение координаты объекта
+ ///
+ ObjectParameters? GetObjectPosition { get; }
+
+ ///
+ /// Шаг объекта
+ ///
+ int GetStep { get; }
+
+ ///
+ /// Попытка переместить объект в указанном направлении
+ ///
+ /// Направление
+ /// true - объект перемещен, false - перемещение невозможно
+ bool TryMoveObject(MovementDirection direction);
+}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToBorder.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToBorder.cs
new file mode 100644
index 0000000..efc02f4
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToBorder.cs
@@ -0,0 +1,49 @@
+namespace ProjectRoadTrain.MovementStrategy;
+
+public class MoveToBorder : AbstractStrategy
+{
+ protected override bool IsTargetDestinaion()
+ {
+ ObjectParameters? objParams = GetObjectParameters;
+ if (objParams == null)
+ {
+ return false;
+ }
+ return objParams.RightBorder - GetStep() <= FieldWidth
+ && objParams.RightBorder + GetStep() >= FieldWidth &&
+ objParams.DownBorder - GetStep() <= FieldHeight
+ && objParams.DownBorder + GetStep() >= FieldHeight;
+ }
+ protected override void MoveToTarget()
+ {
+ ObjectParameters? objParams = GetObjectParameters;
+ if (objParams == null)
+ {
+ return;
+ }
+ int diffX = objParams.RightBorder - FieldWidth;
+ if (Math.Abs(diffX) > GetStep())
+ {
+ if (diffX > 0)
+ {
+ MoveLeft();
+ }
+ else
+ {
+ MoveRight();
+ }
+ }
+ int diffY = objParams.DownBorder - FieldHeight;
+ if (Math.Abs(diffY) > GetStep())
+ {
+ if (diffY > 0)
+ {
+ MoveUp();
+ }
+ else
+ {
+ MoveDown();
+ }
+ }
+ }
+}
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToCenter.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToCenter.cs
new file mode 100644
index 0000000..c70dbb9
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveToCenter.cs
@@ -0,0 +1,54 @@
+namespace ProjectRoadTrain.MovementStrategy;
+
+///
+/// Стратегия перемещения объекта в центр экрана
+///
+public class MoveToCenter : AbstractStrategy
+{
+ protected override bool IsTargetDestinaion()
+ {
+ ObjectParameters? objParams = GetObjectParameters;
+ if (objParams == null)
+ {
+ return false;
+ }
+
+ return objParams.ObjectMiddleHorizontal - GetStep() <= FieldWidth / 2 && objParams.ObjectMiddleHorizontal + GetStep() >= FieldWidth / 2 &&
+ objParams.ObjectMiddleVertical - GetStep() <= 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();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveableTrain.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveableTrain.cs
new file mode 100644
index 0000000..3a7f83b
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MoveableTrain.cs
@@ -0,0 +1,64 @@
+using ProjectRoadTrain.Drawnings;
+
+namespace ProjectRoadTrain.MovementStrategy;
+
+///
+/// Класс-реализация IMoveableObject с использованием DrawningTrain
+///
+public class MoveableCar : IMoveableObject
+{
+ ///
+ /// Поле-объект класса DrawningTrain или его наследника
+ ///
+ private readonly DrawningTrain? _train = null;
+
+ ///
+ /// Конструктор
+ ///
+ /// Объект класса DrawningTrain
+ public MoveableCar(DrawningTrain train)
+ {
+ _train = train;
+ }
+
+ public ObjectParameters? GetObjectPosition
+ {
+ get
+ {
+ if (_train == null || _train.EntityTrain == null || !_train.GetPosX.HasValue || !_train.GetPosY.HasValue)
+ {
+ return null;
+ }
+ return new ObjectParameters(_train.GetPosX.Value, _train.GetPosY.Value, _train.GetWidth, _train.GetHeight);
+ }
+ }
+
+ public int GetStep => (int)(_train?.EntityTrain?.Step ?? 0);
+
+ public bool TryMoveObject(MovementDirection direction)
+ {
+ if (_train == null || _train.EntityTrain == null)
+ {
+ return false;
+ }
+
+ return _train.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,
+ };
+ }
+}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MovementDirection.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MovementDirection.cs
new file mode 100644
index 0000000..68f5c41
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/MovementDirection.cs
@@ -0,0 +1,27 @@
+namespace ProjectRoadTrain.MovementStrategy;
+
+///
+/// Направление перемещения
+///
+public enum MovementDirection
+{
+ ///
+ /// Вверх
+ ///
+ Up = 1,
+
+ ///
+ /// Вниз
+ ///
+ Down = 2,
+
+ ///
+ /// Влево
+ ///
+ Left = 3,
+
+ ///
+ /// Вправо
+ ///
+ Right = 4,
+}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/ObjectParameters.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/ObjectParameters.cs
new file mode 100644
index 0000000..2df453e
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/ObjectParameters.cs
@@ -0,0 +1,72 @@
+namespace ProjectRoadTrain.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;
+ }
+}
\ No newline at end of file
diff --git a/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/StrategyStatus.cs b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/StrategyStatus.cs
new file mode 100644
index 0000000..814885c
--- /dev/null
+++ b/ProjectRoadTrain/ProjectRoadTrain/MovementStrategy/StrategyStatus.cs
@@ -0,0 +1,22 @@
+namespace ProjectRoadTrain.MovementStrategy;
+
+///
+/// Статус выполнения операции перемещения
+///
+public enum StrategyStatus
+{
+ ///
+ /// Все готово к началу
+ ///
+ NotInit,
+
+ ///
+ /// Выполняется
+ ///
+ InProgress,
+
+ ///
+ /// Завершено
+ ///
+ Finish
+}
\ No newline at end of file