示例#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;
        }
示例#2
0
 public override bool IsMate(Cell c)
 {
     return c is HerbivoreCell;
 }
示例#3
0
 public override bool IsFood(Cell c)
 {
     return c is PlantCell;
 }
示例#4
0
 public override bool IsMate(Cell c)
 {
     return c is CarnivoreCell;
 }
示例#5
0
 public override bool IsFood(Cell c)
 {
     return c is HerbivoreCell;
 }
示例#6
0
文件: Queue.cs 项目: aplusbi/ggj2011
 public void Push(Cell c)
 {
     data[beg++] = c;
 }
示例#7
0
 public abstract bool IsMate(Cell c);
示例#8
0
 public abstract bool IsFood(Cell c);