Example #1
0
 public Point GetNextPoint()
 {
     Point headPoint = pointList.Last();
     Point nextPoint = new Point(headPoint);
     nextPoint.ChangeDirection(1, direction);
     return nextPoint;
 }
Example #2
0
        public Point GetNextPoint()
        {
            Point headPoint = pointList.Last();
            Point nextPoint = new Point(headPoint);

            nextPoint.ChangeDirection(1, direction);
            return(nextPoint);
        }
Example #3
0
        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);
            }
        }
Example #4
0
        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);
            }
        }