Example #1
0
 public bool CheckPositionFood(Point food)
 {
     for (int i = 0; i < pList.Count; i++)
     {
         if (food.IsHit(pList[i]))
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
 private bool IsHit(Point point)
 {
     foreach (var p in PointList)
     {
         if (point.IsHit(p))
         {
             return(true);
         }
     }
     return(false);
 }
Example #3
0
 private bool IsHit(Point point)
 {
     foreach (var p in PointList)
     {
         if (point.IsHit(p))
         {
             return true;
         }
     }
     return false;
 }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }