public Point GetNextPoint() { Point head = pList.Last(); Point nextPoint = new Point(head); nextPoint.MovePoint(1, direction); return(nextPoint); }
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.MovePoint(i, direction); pList.Add(p); } }
public Snake() { const int length = 4; direction = Direction.Right; pointsList = new List <Point>(); for (int i = 0; i < length; i++) { Point point = new Point(4, 4, '*'); point.MovePoint(i, direction); pointsList.Add(point); } }
private Point GetNextPoint() { nextPoint = new Point(pointsList.Last()); nextPoint.MovePoint(1, direction); return(nextPoint); }