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 {