From bec2383a819a50f4c862a4bc8fb345980a127be7 Mon Sep 17 00:00:00 2001 From: AnnaLioness Date: Fri, 3 Nov 2023 23:46:31 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Lab1ContainersShip/SetGeneric.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs b/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs index 000768f..8cd05ad 100644 --- a/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs +++ b/Lab1ContainersShip/Lab1ContainersShip/SetGeneric.cs @@ -109,7 +109,6 @@ namespace Lab1ContainersShip /// public T Get(int position) { - // TODO проверка позиции if(position < _places.Count && position >= 0) { return _places[position]; @@ -131,25 +130,13 @@ namespace Lab1ContainersShip { return null; } - // TODO проверка позиции } set { - /*if ((position < _places.Count && position >= 0) && _places.Count < _maxCount) - { - _places[position] = value; - } - - else - { - return; - }*/ + Insert(value, position); - // TODO проверка позиции - // TODO проверка свободных мест в списке - // TODO вставка в список по позиции } } public IEnumerable GetShips(int? maxCars = null)