示例#1
0
        internal bool eat(point food)
        {
            point head = getNextPoint();

            if (head.IsHit(food))
            {
                food.sym = head.sym;
                pList.Add(food);
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
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);
            }
        }