From f98802c7ccd4f0eead11b3626cfe612e8a1a8bd4 Mon Sep 17 00:00:00 2001 From: Zakharov_Rostislav Date: Sat, 21 Oct 2023 17:12:15 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BB=D0=B0=D0=B1=204=20=D0=BE=D1=82=D1=80?= =?UTF-8?q?=D0=B8=D1=81=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BF=D0=BE=D1=87=D0=B8?= =?UTF-8?q?=D0=BD=D0=B8=D0=BB=D0=B0=D1=81=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectBattleship/ProjectBattleship/ShipsGenericCollection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectBattleship/ProjectBattleship/ShipsGenericCollection.cs b/ProjectBattleship/ProjectBattleship/ShipsGenericCollection.cs index 7b6066e..08dc0d0 100644 --- a/ProjectBattleship/ProjectBattleship/ShipsGenericCollection.cs +++ b/ProjectBattleship/ProjectBattleship/ShipsGenericCollection.cs @@ -77,7 +77,7 @@ namespace ProjectBattleship.Generics if (ship != null) { int inRow = _pictureWidth / _placeSizeWidth; - ship.SetPosition(i % inRow * _placeSizeWidth, (_collection.Count / inRow - 1 - i / inRow) * _placeSizeHeight + 5); + ship.SetPosition(i % inRow * _placeSizeWidth, _pictureHeight - _pictureHeight % _placeSizeHeight - (i / inRow + 1) * _placeSizeHeight + 5); ship.DrawTransport(g); } i++;