Exemple #1
0
        internal bool IsHitTail()
        {
            Point head = pList.Last();

            for (int i = 0; i < pList.Count - 2; i++)
            {
                if (head.isHit(pList[i]))
                {
                    return(true);
                }
            }
            return(false);
        }
Exemple #2
0
        internal bool Eat(Point food)
        {
            Point head = GetNextPoint();

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