diff --git a/WarPlanes/WarPlanes/MapWithSetWarPlanesGeneric.cs b/WarPlanes/WarPlanes/MapWithSetWarPlanesGeneric.cs index 1a2594b..687f8d4 100644 --- a/WarPlanes/WarPlanes/MapWithSetWarPlanesGeneric.cs +++ b/WarPlanes/WarPlanes/MapWithSetWarPlanesGeneric.cs @@ -169,9 +169,9 @@ int maxLeft = (countInLine - 1) * _placeSizeWidth; for (int i = 0; i < _setWarPlanes.Count; i++) { - var airplane = _setWarPlanes.Get(i); - airplane?.SetObject(maxLeft - i % countInLine * _placeSizeWidth +10, _pictureHeight - _placeSizeHeight - i / countInLine * _placeSizeHeight, _pictureWidth, _pictureHeight); - airplane?.DrawningObject(g); + var warplane = _setWarPlanes.Get(i); + warplane?.SetObject(maxLeft - i % countInLine * _placeSizeWidth +10, _pictureHeight - _placeSizeHeight - i / countInLine * _placeSizeHeight, _pictureWidth, _pictureHeight); + warplane?.DrawningObject(g); } } }