public CPoint GetNextPoint() { CPoint head = pList.Last(); CPoint nextPoint = new CPoint(head); ; nextPoint.Move(1, direction); return nextPoint; }
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); } }