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