From 8e1ef8419836f64479e909b40d9875c9639a1436 Mon Sep 17 00:00:00 2001 From: tellsense Date: Sun, 15 Oct 2023 19:09:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ElectricLocomotive/DrawningElectricLocomotive.cs | 10 +++++----- .../ElectricLocomotive/MoveToRightEdge.cs | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ElectricLocomotive/ElectricLocomotive/DrawningElectricLocomotive.cs b/ElectricLocomotive/ElectricLocomotive/DrawningElectricLocomotive.cs index 9169a03..ffd4619 100644 --- a/ElectricLocomotive/ElectricLocomotive/DrawningElectricLocomotive.cs +++ b/ElectricLocomotive/ElectricLocomotive/DrawningElectricLocomotive.cs @@ -33,11 +33,11 @@ namespace ProjectElectricLocomotive.DrawingObjects g.DrawRectangle(pen, _startPosX + 40, _startPosY + 24, 25, 11); g.FillPolygon(additionalBrush, new Point[] { - new Point(_startPosX + 41, _startPosY + 25), - new Point(_startPosX + 65, _startPosY + 25), - new Point(_startPosX + 65, _startPosY + 35), - new Point(_startPosX + 41, _startPosY + 35), - new Point(_startPosX + 41, _startPosY + 25), + new Point(_startPosX + 61, _startPosY + 25), + new Point(_startPosX + 85, _startPosY + 25), + new Point(_startPosX + 85, _startPosY + 35), + new Point(_startPosX + 61, _startPosY + 35), + new Point(_startPosX + 61, _startPosY + 25), } ); diff --git a/ElectricLocomotive/ElectricLocomotive/MoveToRightEdge.cs b/ElectricLocomotive/ElectricLocomotive/MoveToRightEdge.cs index 15f2992..65988c0 100644 --- a/ElectricLocomotive/ElectricLocomotive/MoveToRightEdge.cs +++ b/ElectricLocomotive/ElectricLocomotive/MoveToRightEdge.cs @@ -21,7 +21,8 @@ namespace ProjectElectricLocomotive.MovementStrategy var objParams = GetObjectParameters; if (objParams == null) return; if (objParams.RightBorder < FieldWidth - GetStep()) MoveRight(); - + if (objParams.DownBorder < FieldHeight - GetStep()) MoveDown(); + } }