43 lines
816 B
C#
43 lines
816 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AirFighter
|
|
{
|
|
internal class SetAircraftsGeneric<T>
|
|
where T : class
|
|
{
|
|
private readonly T[] _places;
|
|
|
|
public int Count => _places.Length;
|
|
|
|
public SetAircraftsGeneric(int count)
|
|
{
|
|
_places = new T[count];
|
|
}
|
|
|
|
public bool Insert(T aircraft)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public bool Insert(T aircraft, int position)
|
|
{
|
|
_places[position] = aircraft;
|
|
return true;
|
|
}
|
|
|
|
public bool Remove(int position)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public T Get(int position)
|
|
{
|
|
return _places[position];
|
|
}
|
|
}
|
|
}
|