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