From 27368347ffa07ce2f743c98cf5d8c1eb8a3d6596 Mon Sep 17 00:00:00 2001 From: bulatova_karina Date: Tue, 19 Dec 2023 22:31:31 +0300 Subject: [PATCH] laba7: chipi chipi chapa chapa maybe ready --- WarmlyShip/WarmlyShip/ShipsGenericCollection.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WarmlyShip/WarmlyShip/ShipsGenericCollection.cs b/WarmlyShip/WarmlyShip/ShipsGenericCollection.cs index ffee1a0..8ed358b 100644 --- a/WarmlyShip/WarmlyShip/ShipsGenericCollection.cs +++ b/WarmlyShip/WarmlyShip/ShipsGenericCollection.cs @@ -135,7 +135,9 @@ namespace WarmlyShip.Generics if (ship != null) { int width = _pictureWidth / _placeSizeWidth; - ship.SetPosition((width - 1 - (i % width)) * _placeSizeWidth, i / width * _placeSizeHeight); + ship._pictureWidth = _pictureWidth; + ship._pictureHeight = _pictureHeight; + ship.SetPosition(i % width * _placeSizeWidth, i / width * _placeSizeHeight); ship.DrawTransport(g); } i++;