From d66d260f44240ea99c28142a3f889248a80b5d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BC=D0=B0?= Date: Tue, 21 May 2024 01:59:19 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/TankDockingService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectTank/ProjectTank/CollectionGenericObjects/TankDockingService.cs b/ProjectTank/ProjectTank/CollectionGenericObjects/TankDockingService.cs index 02580c5..8a9a7ac 100644 --- a/ProjectTank/ProjectTank/CollectionGenericObjects/TankDockingService.cs +++ b/ProjectTank/ProjectTank/CollectionGenericObjects/TankDockingService.cs @@ -22,7 +22,7 @@ namespace ProjectTank.CollectionGenericObjects int width = _pictureWidth / _placeSizeWidth; int height = _pictureHeight / _placeSizeHeight; Pen pen = new(Color.Black, 2); - for (int i = 0; i < width; i++) + for (int i = 0; i < width + 1; i++) { for (int j = 0; j < height + 1; ++j) { @@ -47,7 +47,7 @@ namespace ProjectTank.CollectionGenericObjects _collection.Get(i).SetPosition(_placeSizeWidth * curWidth + 10, curHeight * _placeSizeHeight + 10); } - if (curWidth < width - 1) + if (curWidth < width) curWidth++; else {