From b576a536db91ba3fc35e70fee1511769d1f23528 Mon Sep 17 00:00:00 2001 From: AnnaLioness Date: Sun, 8 Oct 2023 21:34:51 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs b/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs index 18dbd8c..77ef363 100644 --- a/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs +++ b/Lab1ContainersShip/Lab1ContainersShip/ShipGenericCollection.cs @@ -130,7 +130,7 @@ namespace Lab1ContainersShip T t = _collection.Get(i); if (t != null) { - t.SetPosition((i % (_pictureWidth / _placeSizeWidth)) * _placeSizeWidth, i / (_pictureWidth / _placeSizeWidth) * _placeSizeHeight); + t.SetPosition(((_collection.Count -i - 1) % (_pictureWidth / _placeSizeWidth)) * _placeSizeWidth, (_collection.Count - i-1) / (_pictureWidth / _placeSizeWidth) * _placeSizeHeight); t.DrawShip(g); } // TODO получение объекта