diff --git a/AirFighter/AirFighter/MapWithSetAirFightersGeneric.cs b/AirFighter/AirFighter/MapWithSetAirFightersGeneric.cs
new file mode 100644
index 0000000..ce9e242
--- /dev/null
+++ b/AirFighter/AirFighter/MapWithSetAirFightersGeneric.cs
@@ -0,0 +1,205 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AirFighter
+{
+ ///
+ /// Карта с набром объектов под нее
+ ///
+ ///
+ ///
+ internal class MapWithSetAirFightersGeneric
+ where T : class, IDrawningObject
+ where U : AbstractMap
+ {
+ ///
+ /// Ширина окна отрисовки
+ ///
+ private readonly int _pictureWidth;
+ ///
+ /// Высота окна отрисовки
+ ///
+ private readonly int _pictureHeight;
+ ///
+ /// Размер занимаемого объектом места (ширина)
+ ///
+ private readonly int _placeSizeWidth = 210;
+ ///
+ /// Размер занимаемого объектом места (высота)
+ ///
+ private readonly int _placeSizeHeight = 90;
+ ///
+ /// Набор объектов
+ ///
+ private readonly SetAirFightersGeneric _setAirFighters;
+ ///
+ /// Карта
+ ///
+ private readonly U _map;
+ ///
+ /// Конструктор
+ ///
+ ///
+ ///
+ ///
+ public MapWithSetAirFightersGeneric(int picWidth, int picHeight, U map)
+ {
+ int width = picWidth / _placeSizeWidth;
+ int height = picHeight / _placeSizeHeight;
+ _setAirFighters = new SetAirFightersGeneric(width * height);
+ _pictureWidth = picWidth;
+ _pictureHeight = picHeight;
+ _map = map;
+ }
+ ///
+ /// Перегрузка оператора сложения
+ ///
+ ///
+ ///
+ ///
+ public static int operator +(MapWithSetAirFightersGeneric map, T airFighter)
+ {
+ return map._setAirFighters.Insert(airFighter);
+ }
+ ///
+ /// Перегрузка оператора вычитания
+ ///
+ ///
+ ///
+ ///
+ public static T operator -(MapWithSetAirFightersGeneric map, int
+ position)
+ {
+ return map._setAirFighters.Remove(position);
+ }
+ ///
+ /// Вывод всего набора объектов
+ ///
+ ///
+ public Bitmap ShowSet()
+ {
+ Bitmap bmp = new(_pictureWidth, _pictureHeight);
+ Graphics gr = Graphics.FromImage(bmp);
+ DrawBackground(gr);
+ DrawAirFighters(gr);
+ return bmp;
+ }
+ ///
+ /// Просмотр объекта на карте
+ ///
+ ///
+ public Bitmap ShowOnMap()
+ {
+ Shaking();
+ for (int i = 0; i < _setAirFighters.Count; i++)
+ {
+ var airFighter = _setAirFighters.Get(i);
+ if (airFighter != null)
+ {
+ return _map.CreateMap(_pictureWidth, _pictureHeight, airFighter);
+ }
+ }
+ return new(_pictureWidth, _pictureHeight);
+ }
+ ///
+ /// Перемещение объекта по крате
+ ///
+ ///
+ ///
+ public Bitmap MoveObject(Direction direction)
+ {
+ if (_map != null)
+ {
+ return _map.MoveObject(direction);
+ }
+ return new(_pictureWidth, _pictureHeight);
+ }
+ ///
+ /// "Взбалтываем" набор, чтобы все элементы оказались в начале
+ ///
+ private void Shaking()
+ {
+ int j = _setAirFighters.Count - 1;
+ for (int i = 0; i < _setAirFighters.Count; i++)
+ {
+ if (_setAirFighters.Get(i) == null)
+ {
+ for (; j > i; j--)
+ {
+ var car = _setAirFighters.Get(j);
+ if (car != null)
+ {
+ _setAirFighters.Insert(car, i);
+ _setAirFighters.Remove(j);
+ break;
+ }
+ }
+ if (j <= i)
+ {
+ return;
+ }
+ }
+ }
+ }
+ ///
+ /// Метод отрисовки фона
+ ///
+ ///
+ private void DrawBackground(Graphics g)
+ {
+ Pen pen = new(Color.Black, 3);
+ for (int i = 0; i < _pictureWidth / _placeSizeWidth; i++)
+ {
+ for (int j = 0; j < _pictureHeight / _placeSizeHeight + 1; ++j)
+ {//линия рамзетки места
+ g.DrawLine(pen, i * _placeSizeWidth, j * _placeSizeHeight, i *
+ _placeSizeWidth + _placeSizeWidth / 2, j * _placeSizeHeight);
+
+ g.FillPolygon(new SolidBrush(Color.Gray), new PointF[]
+ {
+ new Point(i * _placeSizeWidth + _placeSizeWidth / 5, j * _placeSizeHeight + _placeSizeHeight / 10),
+ new Point((i + 1) * _placeSizeWidth - _placeSizeWidth / 5, j * _placeSizeHeight + _placeSizeHeight / 10),
+ new Point((i + 1) * _placeSizeWidth - _placeSizeWidth / 5, (j + 1) * _placeSizeHeight - _placeSizeHeight / 10),
+ new Point(i * _placeSizeWidth + _placeSizeWidth / 5, (j + 1) * _placeSizeHeight - _placeSizeHeight / 10),
+ });
+ }
+ g.DrawLine(pen, i * _placeSizeWidth, 0, i * _placeSizeWidth,
+ (_pictureHeight / _placeSizeHeight) * _placeSizeHeight);
+ }
+ }
+ ///
+ /// Метод прорисовки объектов
+ ///
+ ///
+ private void DrawAirFighters(Graphics g)
+ {
+
+ // TODO установка позиции
+ int currentWidth = _pictureWidth / _placeSizeWidth - 1;
+ int currentHeight = _pictureHeight / _placeSizeHeight - 1;
+
+ for (int i = 0; i < _setAirFighters.Count; i++)
+ {
+ _setAirFighters.Get(i).SetObject(currentWidth * _placeSizeWidth, currentHeight * _placeSizeHeight, _pictureWidth, _pictureHeight);
+ _setAirFighters.Get(i)?.DrawningObject(g);
+
+ if(currentWidth > 0)
+ {
+ currentWidth -= 1;
+ }
+ else
+ {
+ if(currentHeight > 0)
+ {
+ currentHeight -= 1;
+ currentWidth = _pictureWidth / _placeSizeWidth - 1;
+ }else return;
+ }
+ }
+ }
+
+ }
+}
diff --git a/AirFighter/AirFighter/SetAirFightersGeneric.cs b/AirFighter/AirFighter/SetAirFightersGeneric.cs
new file mode 100644
index 0000000..e5c62a2
--- /dev/null
+++ b/AirFighter/AirFighter/SetAirFightersGeneric.cs
@@ -0,0 +1,165 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms.VisualStyles;
+
+namespace AirFighter
+{
+ ///
+ /// Параметризованный набор объектов
+ ///
+ ///
+ internal class SetAirFightersGeneric
+ where T: class
+ {
+ ///
+ /// Массив объектов, которые храним
+ ///
+ private readonly T[] _places;
+ ///
+ /// Количество объектов в массиве
+ ///
+ public int Count => _places.Length;
+ ///
+ /// Конструктор
+ ///
+ ///
+ public SetAirFightersGeneric(int count)
+ {
+ _places = new T[count];
+ }
+ ///
+ /// Проверка на наличие пустых мест
+ ///
+ ///
+ ///
+ private bool CheckNullPosition(int firstIndex)
+ {
+ if(firstIndex >= _places.Length && firstIndex < 0)
+ {
+ return false;
+ }
+ for(int i = firstIndex; i < _places.Length; i++)
+ {
+ if(_places[i] == null)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ ///
+ /// Добавление объекта в набор
+ ///
+ /// Добавляемый автомобиль
+ ///
+ public int Insert(T airFighter)
+ {
+ // TODO вставка в начало набора
+
+ if (!CheckNullPosition(0))
+ {
+ return -1;
+ }
+ else
+ {
+ T temp = airFighter;
+ for(int i = 0; i < _places.Length; i++)
+ {
+ if (_places[i] == null)
+ {
+ _places[i] = temp;
+ break;
+ }
+ else
+ {
+ T temp2 = _places[i];
+ _places[i] = temp;
+ temp = temp2;
+ }
+ }
+ return 0;
+ }
+ }
+ ///
+ /// Добавление объекта в набор на конкретную позицию
+ ///
+ /// Добавляемый автомобиль
+ /// Позиция
+ ///
+ public int Insert(T airFighter, int position)
+ {
+ // TODO проверка позиции
+ // TODO проверка, что элемент массива по этой позиции пустой,если нет, то
+ // проверка, что после вставляемого элемента в массиве есть пустой элемент
+ // сдвиг всех объектов, находящихся справа от позиции до первого пустого элемента
+ // TODO вставка по позиции
+ if (_places[position] == null)
+ {
+ _places[position] = airFighter;
+ }
+ else
+ {
+ if(CheckNullPosition(position + 1))
+ {
+ T temp = airFighter;
+ for (int i = position; i < _places.Length; i++)
+ {
+ if (_places[i] == null)
+ {
+ _places[i] = temp;
+ break;
+ }
+ else
+ {
+ T temp2 = _places[i];
+ _places[i] = temp;
+ temp = temp2;
+ }
+ }
+ }
+ else
+ {
+ return -1;
+ }
+ }
+ return position;
+ }
+ ///
+ /// Удаление объекта из набора с конкретной позиции
+ ///
+ ///
+ ///
+ public T Remove(int position)
+ {
+ // TODO проверка позиции
+ // TODO удаление объекта из массива, присовив элементу массива
+ //значение null
+ if (position >= 0 && position < _places.Length && _places[position] != null)
+ {
+ T temp = _places[position];
+ _places[position] = null;
+ return temp;
+ }
+ else
+ return null;
+ }
+ ///
+ /// Получение объекта из набора по позиции
+ ///
+ ///
+ ///
+ public T Get(int position)
+ {
+ // TODO проверка позиции
+ if (_places[position] != null)
+ {
+ return _places[position];
+ }
+ else
+ return null;
+ }
+}
+}