public Point GetNextPoint() { Point headPoint = pointList.Last(); Point nextPoint = new Point(headPoint); nextPoint.ChangeDirection(1, direction); return nextPoint; }
public Point GetNextPoint() { Point headPoint = pointList.Last(); Point nextPoint = new Point(headPoint); nextPoint.ChangeDirection(1, direction); return(nextPoint); }
public Hero(Point tail, int lenght, Direction direction) { this.direction = direction; pointList = new List<Point>(); for (int i = 0; i < lenght; i++) { Point point = new Point(tail); point.ChangeDirection(i, direction); pointList.Add(point); } }
public Hero(Point tail, int lenght, Direction direction) { this.direction = direction; pointList = new List <Point>(); for (int i = 0; i < lenght; i++) { Point point = new Point(tail); point.ChangeDirection(i, direction); pointList.Add(point); } }