лаб 4 отрисовка починилась

This commit is contained in:
Zakharov_Rostislav 2023-10-21 17:12:15 +04:00
parent bde45c346f
commit f98802c7cc

View File

@ -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++;