diff --git a/AirBomber/AirBomber/PlanesGenericCollection.cs b/AirBomber/AirBomber/PlanesGenericCollection.cs index 0031f45..0d996fb 100644 --- a/AirBomber/AirBomber/PlanesGenericCollection.cs +++ b/AirBomber/AirBomber/PlanesGenericCollection.cs @@ -119,15 +119,15 @@ namespace AirBomber private void DrawObjects(Graphics g) { int heightObjCount = _pictureHeight / _placeSizeHeight; - int widthObjCount = _pictureWidth / _placeSizeWidth; // Добавляем вычисление ширины + int widthObjCount = _pictureWidth / _placeSizeWidth; for (int i = 0; i < _collection.Count; i++) { T? type = _collection.Get(i); if (type != null) { - int row = i / widthObjCount; // Ряд - сначала сверху вниз - int col = widthObjCount - 1 - (i % widthObjCount); // Столбец - справа налево + int row = i / widthObjCount; + int col = widthObjCount - 1 - (i % widthObjCount); type.SetPosition(col * _placeSizeWidth, row * _placeSizeHeight); type?.DrawPlane(g);