правки

This commit is contained in:
Kirill 2024-04-18 09:37:48 +04:00
parent 11306c4491
commit 50b8f8e872

View File

@ -37,7 +37,7 @@ namespace ProjectRoadTrain.CollectionGenericObjects;
int width = _pictureWidth / _placeSizeWidth;
int height = _pictureHeight / _placeSizeHeight;
int curWidth = width - 1;
int curWidth = 0;
int curHeight = 0;
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);
}
if (curWidth > 0)
curWidth--;
if (curWidth < width -1)
curWidth++;
else
{
curWidth = width - 1;
curWidth = 0;
curHeight++;
}