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

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