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