Esempio n. 1
0
 public bool CheckPositionFood(Point food)
 {
     for (int i = 0; i < pList.Count; i++)
     {
         if (food.IsHit(pList[i]))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
 private bool IsHit(Point point)
 {
     foreach (var p in PointList)
     {
         if (point.IsHit(p))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 3
0
 private bool IsHit(Point point)
 {
     foreach (var p in PointList)
     {
         if (point.IsHit(p))
         {
             return true;
         }
     }
     return false;
 }
Esempio n. 4
0
        public bool Eat(Point food)
        {
            Point head = GetNextPoint();

            if (head.IsHit(food))
            {
                food.sym = head.sym;
                pList.Add(food);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 5
0
        internal bool Eat(Point food)
        {
            Point head = GetNextStep();

            if (head.IsHit(food))
            {
                food.sym = head.sym;
                PointList.Add(food);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 6
0
        internal bool Eat(Point food)
        {
            // Point head = GetNextPoint();
            Point head = pList.Last();

            if (head.IsHit(food))
            {
                food.sym = head.sym;
                pList.Add(food);
                return(true);
            }
            else
            {
                return(false);
            }
        }