Exemplo n.º 1
0
        public point GetNextPoint()
        {
            point head      = pList.Last();
            point nextPoint = new point(head);

            nextPoint.Move(1, direction);
            return(nextPoint);
        }
Exemplo n.º 2
0
 public Snake(point tail, int length, Direction _direction)
 {
     direction = _direction;
     pList     = new List <point>();
     for (int i = 0; i < length; i++)
     {
         point p = new point(tail);
         p.Move(i, direction);
         pList.Add(p);
     }
     score = 0;
 }