еще правки

This commit is contained in:
Kirill 2024-04-20 09:36:15 +04:00
parent 50b8f8e872
commit 2f57687687

View File

@ -37,7 +37,7 @@ namespace ProjectRoadTrain.CollectionGenericObjects;
int width = _pictureWidth / _placeSizeWidth; int width = _pictureWidth / _placeSizeWidth;
int height = _pictureHeight / _placeSizeHeight; int height = _pictureHeight / _placeSizeHeight;
int curWidth = 0; int curWidth = width - 1;
int curHeight = 0; int curHeight = 0;
for (int i = 0; i < (_collection?.Count ?? 0); i++) for (int i = 0; i < (_collection?.Count ?? 0); i++)
@ -48,11 +48,11 @@ namespace ProjectRoadTrain.CollectionGenericObjects;
_collection.Get(i).SetPosition(_placeSizeWidth * curWidth + 10, curHeight * _placeSizeHeight + 10); _collection.Get(i).SetPosition(_placeSizeWidth * curWidth + 10, curHeight * _placeSizeHeight + 10);
} }
if (curWidth < width -1) if (curWidth > 0)
curWidth++; curWidth--;
else else
{ {
curWidth = 0; curWidth = width - 1;
curHeight++; curHeight++;
} }