|
|
От: |
Sharov
|
|
| Дата: | 02.02.18 19:36 | ||
| Оценка: | |||
G>class Q1 : Q2
G>{ }
G>class Q2 : Q1
G>{ }
G>public interface IEatableBy<TEater>
where TEater : Entity
{
void BeEatenBy(TEater animal);
}
public class Entity
{
}
public class Animal : Entity { }
public abstract class Animal<TVictim>
//моя жертва съедаема мной самим
where TVictim : IEatableBy<Entity>
{
/// <summary>
/// жертвы
/// </summary>
protected HashSet<TVictim> Victims;
}