лаб 4 отрисовка починилась
This commit is contained in:
parent
bde45c346f
commit
f98802c7cc
@ -77,7 +77,7 @@ namespace ProjectBattleship.Generics
|
|||||||
if (ship != null)
|
if (ship != null)
|
||||||
{
|
{
|
||||||
int inRow = _pictureWidth / _placeSizeWidth;
|
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);
|
ship.DrawTransport(g);
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
Reference in New Issue
Block a user