예제 #1
0
파일: ExtGame.cs 프로젝트: aplusbi/ggj2011
        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);