From 9cadd9bb31e6e6cd0feab2d3eca5fb51460ed0e7 Mon Sep 17 00:00:00 2001 From: malimova Date: Mon, 16 Oct 2023 00:43:49 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/PlanesGenericCollection.cs | 6 ++---- AirBomber/AirBomber/SetGeneric.cs | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/AirBomber/AirBomber/PlanesGenericCollection.cs b/AirBomber/AirBomber/PlanesGenericCollection.cs index 0d996fb..8958b73 100644 --- a/AirBomber/AirBomber/PlanesGenericCollection.cs +++ b/AirBomber/AirBomber/PlanesGenericCollection.cs @@ -21,11 +21,11 @@ namespace AirBomber /// /// Размер занимаемого объектом места (ширина) /// - private readonly int _placeSizeWidth = 150; + private readonly int _placeSizeWidth = 170; /// /// Размер занимаемого объектом места (высота) /// - private readonly int _placeSizeHeight = 118; + private readonly int _placeSizeHeight = 120; /// /// Набор объектов /// @@ -118,9 +118,7 @@ namespace AirBomber /// private void DrawObjects(Graphics g) { - int heightObjCount = _pictureHeight / _placeSizeHeight; int widthObjCount = _pictureWidth / _placeSizeWidth; - for (int i = 0; i < _collection.Count; i++) { T? type = _collection.Get(i); diff --git a/AirBomber/AirBomber/SetGeneric.cs b/AirBomber/AirBomber/SetGeneric.cs index 8fe83a3..6732b9d 100644 --- a/AirBomber/AirBomber/SetGeneric.cs +++ b/AirBomber/AirBomber/SetGeneric.cs @@ -53,7 +53,7 @@ namespace AirBomber { if (_places[i] != null) NoEmpty++; } - if (NoEmpty == Count - position - 1) return -1; + if (NoEmpty == Count - position) return -1; if (position < Count && position >= 0) { @@ -88,7 +88,7 @@ namespace AirBomber { return false; } - _places[position] = null; + _places[position - 1] = null; return true; } ///