示例#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 lenght, Direction _direction)
 {
     direction = _direction;
     plist     = new List <point>();
     for (int i = 0; i < lenght; i++)
     {
         point p = new point(tail);
         p.Move(i, direction);
         plist.Add(p);
     }
 }