From 75fa75b3eb0094f82516bc8acb17a83a94669ec3 Mon Sep 17 00:00:00 2001 From: Daniya_Youdakova Date: Thu, 15 Dec 2022 22:42:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BB=D0=B0=D0=B1=20-=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AircraftCarrier/AircraftCarrier/AbstractMap.cs | 2 +- AircraftCarrier/AircraftCarrier/DrawningAircraftCarrier.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AircraftCarrier/AircraftCarrier/AbstractMap.cs b/AircraftCarrier/AircraftCarrier/AbstractMap.cs index a7ac427..c42d91e 100644 --- a/AircraftCarrier/AircraftCarrier/AbstractMap.cs +++ b/AircraftCarrier/AircraftCarrier/AbstractMap.cs @@ -38,7 +38,6 @@ namespace AircraftCarrier int yNumOfCells; int xObjOffset; int yObjOffset; - switch (direction) { case Direction.Up: @@ -149,6 +148,7 @@ namespace AircraftCarrier } break; } + if (roadIsClear) { _drawningObject.MoveObject(direction); diff --git a/AircraftCarrier/AircraftCarrier/DrawningAircraftCarrier.cs b/AircraftCarrier/AircraftCarrier/DrawningAircraftCarrier.cs index d0edec2..cbc032f 100644 --- a/AircraftCarrier/AircraftCarrier/DrawningAircraftCarrier.cs +++ b/AircraftCarrier/AircraftCarrier/DrawningAircraftCarrier.cs @@ -35,7 +35,6 @@ namespace AircraftCarrier // /// Ширина отрисовки самолета /// - protected readonly int _aircraftcarrierWidth = 230; protected readonly int _aircraftcarrierHeight = 80; public DrawningAircraftCarrier(int speed, float weight, Color bodyColor) @@ -53,6 +52,7 @@ namespace AircraftCarrier { _startPosX = x; _startPosY = y; + _pictureWidth = width; _pictureHeigth = height; }