Beispiel #1
0
        public static bool AddCell(int x, int y, Cell c)
        {
            if (grid[x, y] != 0)
                return false;

            int id = GetID();
            cells.Add(id, c);
            grid[x, y] = id;

            return true;
        }
Beispiel #2
0
 public override bool IsMate(Cell c)
 {
     return c is HerbivoreCell;
 }
Beispiel #3
0
 public override bool IsFood(Cell c)
 {
     return c is PlantCell;
 }
Beispiel #4
0
 public override bool IsMate(Cell c)
 {
     return c is CarnivoreCell;
 }
Beispiel #5
0
 public override bool IsFood(Cell c)
 {
     return c is HerbivoreCell;
 }
Beispiel #6
0
 public void Push(Cell c)
 {
     data[beg++] = c;
 }
Beispiel #7
0
 public abstract bool IsMate(Cell c);
Beispiel #8
0
 public abstract bool IsFood(Cell c);