some fixes

This commit is contained in:
Nikita 2025-02-22 21:26:35 +04:00
parent 2235a53cf3
commit 14c3ee914f
3 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ public class DrawningBoat
/// <summary>
/// Высота прорисовки катамарана
/// </summary>
private readonly int _drawningBoatHeight = 25;
private readonly int _drawningBoatHeight = 22;
/// <summary>
/// координата х обьекта
/// </summary>

View File

@ -15,9 +15,9 @@ public class MoveToBorder : AbstractStrategy
ObjectParameters? objParams = GetObjectParameters;
if (objParams == null)
return;
if (objParams.RightBorder + GetStep() < FieldWidth)
if (objParams.RightBorder + GetStep() <= FieldWidth)
MoveRight();
if (objParams.DownBorder + GetStep() < FieldHeight)
if (objParams.DownBorder + GetStep() <= FieldHeight)
MoveDown();
}

View File

@ -12,7 +12,7 @@ namespace ProjectCatamaran.MovementStrategy
/// <summary>
/// Поле-объект класса DrawningBoat или его наследника
/// </summary>
private DrawningBoat _boat = null;
private readonly DrawningBoat _boat = null;
/// <summary>
/// Конструктор
/// </summary>