From d34467b4a52ffb01da1bce3b0d172bf26c3b17e8 Mon Sep 17 00:00:00 2001 From: just1valery Date: Sun, 9 Oct 2022 12:56:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=AD=D1=82=D0=B0=D0=BF=202.=20=D0=9A=D0=BB?= =?UTF-8?q?=D0=B0=D1=81=D1=81=20MapsCollection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WarmlyShip/WarmlyShip/MapsCollection.cs | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 WarmlyShip/WarmlyShip/MapsCollection.cs diff --git a/WarmlyShip/WarmlyShip/MapsCollection.cs b/WarmlyShip/WarmlyShip/MapsCollection.cs new file mode 100644 index 0000000..58deb99 --- /dev/null +++ b/WarmlyShip/WarmlyShip/MapsCollection.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WarmlyShip +{ + internal class MapsCollection + { + /// + /// Словарь (хранилище) с картами + /// + readonly Dictionary> _mapStorages; + /// + /// Возвращение списка названий карт + /// + public List Keys => _mapStorages.Keys.ToList(); + /// + /// Ширина окна отрисовки + /// + private readonly int _pictureWidth; + /// + /// Высота окна отрисовки + /// + private readonly int _pictureHeight; + /// + /// Конструктор + /// + /// + /// + public MapsCollection(int pictureWidth, int pictureHeight) + { + _mapStorages = new Dictionary>(); + _pictureWidth = pictureWidth; + _pictureHeight = pictureHeight; + } + /// + /// Добавление карты + /// + /// Название карты + /// Карта + public void AddMap(string name, AbstractMap map) + { + // TODO Прописать логику для добавления + } + /// + /// Удаление карты + /// + /// Название карты + public void DelMap(string name) + { + // TODO Прописать логику для удаления + } + /// + /// Доступ к парковке + /// + /// + /// + public MapWithSetShipsGeneric this[string ind] + { + get + { + // TODO Продумать логику получения объекта + return null; + } + } + } +}