示例#1
0
        public point getNextPoint()
        {
            point head      = pList.Last();
            point nextPoint = new point(head);

            nextPoint.move(1, _direction);
            return(nextPoint);
        }
示例#2
0
 public snake(point tail, int length, direction direction2)
 {
     _direction = direction2;
     pList      = new List <point>();
     for (int i = 0; i < length; i++)
     {
         point p = new point(tail);
         p.move(i, direction2);
         pList.Add(p);
     }
 }