public Point GetNextPoint() { Point head = this.plist.Last(); Point next = new Point(head); next.Move(1, this.direction); return next; }
public Point getNextPoint() { Point head = pList.Last(); Point nextPoint = new Point(head); nextPoint.Move(1 , direction); return nextPoint; }
public Point GetNextPoint() { Point head = pList.Last(); Point nextPoint = new Point(head); nextPoint.Move(1, direction); return(nextPoint); }
public Snake(Point tail, int lenght, Direction direction) { for (int i = 0; i < lenght; i++) { Point p = new Point(tail); p.Move(i, direction); pList.Add(p); } }
private Point GetNextPoint() { Point head = _points.Last(); Point nextPoint = new Point(head); nextPoint.Move(1, _direction); return(nextPoint); }
private Point GetNextPoint() { Point pLast = pLine.Last(); Point pNext = new Point(pLast); pNext.Move(1, direction); return(pNext); }
private Point GetNextPoint() { //Console.WriteLine(pList.Capacity-2); Point head = pList[pList.Count - 1]; Point nextPoint = new Point(head); nextPoint.Move(1, direction); return(nextPoint); }
public Snake(Point tail, int length, Direction direction) { pList = new List<Point>(); for(int i = 0; i < length; i++) { Point p = new Point(tail); p.Move(i, direction); pList.Add(p); } }
public Snake(Point tail, int length, Direction direction) { this.direction = direction; for (int i = 0; i < length; i++) { Point p = new Point(tail); p.Move(i, direction); pList.Add(p); } }
/// <summary> /// Конструктор /// </summary> /// <param name="tail">Позиция хвоста змейки</param> /// <param name="length">Длина змейки</param> /// <param name="direction">Направление перемещения змейки</param> public Snake(Point tail, int length, Direction direction) { Direction = direction; for (var i = 0; i <= length; i++) { var point = new Point(tail); point.Move(i, direction); LinePoints.Add(point); } }
public Snake(Point tail, int length, Dir _dir) { dir = _dir; pList = new List <Point>(); for (int i = 0; i < length; i++) { Point p = new Point(tail); p.Move(i, dir); pList.Add(p); } }
public Snake(Point tall, int length, Direction _direction) { direction = _direction; vList = new List <Point>(); for (int i = 0; i < length; i++) { Point p = new Point(tall); p.Move(i, direction); vList.Add(p); } }
public void Move() { Point tail = pList.First(); Point head = pList.Last(); Point NextPoint = new Point(head); tail.Clear(); pList.Remove(tail); NextPoint.Move(1, direction); NextPoint.Draw(); pList.Add(NextPoint); }
public Snake(Point tail, int length, Direction dir) { pline = new List <Point>(); direction = dir; for (int i = 0; i < length; i++) { Point p = new Point(tail); p.Move(i, dir); pline.Add(p); } }
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.Move(i, Direction); pList.Add(p); } }
public Snake(Point tail, int lenght, Direction direction) { plist = new List <Point>(); this.direction = direction; for (int i = 0; i < lenght; i++) { Point p = new Point(tail); p.Move(i, direction); plist.Add(p); } }
public Snake(Point tail, int lenght, Direction _direction) { direction = _direction; pList = new List <Point>();//create list for (int i = 0; i <= lenght; i++) { Point p = new Point(tail); //copy point of tail p.Move(i, direction); // move to direction on i value pList.Add(p); // add point to list } }
public Snake(Point tail, int length, Direction _direction) { direction = _direction; plist = new List <Point>(); for (int i = 0; i < length; i++) { Point p = new Point(tail); // создаются точки, являющиися точной копией хвостовой точки p.Move(i, direction); // сдвигается на i позиций по направлению дирекции и добавить точку в список plist.Add(p); } }
public Snake(Point tail, int length, Direction _direction) { direction = _direction; pList = new List <Point>(); for (int i = 0; i < length; i++) { Point p = new Point(tail, ConsoleColor.Red); p.Move(i, direction); pList.Add(p); } }
public Snake(Point tail, int length, Direction direction) { _direction = direction; pointList = new List <Point>(); for (int i = 0; i < length; i++) { Point point = new Point(tail); point.Move(i, direction); pointList.Add(point); } }
public Snake(Point tail, int length, Direction _direction) { points = new List<Point>(); direction = _direction; for(int _x = 0; _x < length; _x++) { Point p = new Point(tail); p.Move(_x, direction); points.Add(p); } }
/// Методы /// /* Функция построения змейки */ public Snake(Point tail, int lenght, Direction _direction) { direction = _direction; // Переменная направления движения pList = new List <Point>(); // Создаем List точек for (int i = 0; i < lenght; i++) // Создаем список точек из которых состоит змейка { Point p = new Point(tail); // Новая точка p.Move(i, direction); // Сдвигаем точку pList.Add(p); // Добавляем точку } }
public Snake(Point tail, int lenght, Direction _direction) { direction = _direction; pointList = new List <Point>(); for (int i = 0; i < lenght; i++) { Point p = new Point(tail); p.Move(i, direction); pointList.Add(p); } }
public Snake(Point t, int l, Direction _d) { d = _d; points = new List <Point>(); for (int i = 0; i < l; ++i) { Point p = new Point(t); p.Move(i, d); points.Add(p); } }
public Snake(Point tail,int Lenth,Direction _direct) { direct = _direct; pList = new List<Point>(); for (int i = 0; i < Lenth; i++) { Point p = new Point(tail); p.Move(i, direct); pList.Add(p); } }
public Point GetNewPoint() { Point LastPoint = dots.Last(); Point NextPoint = new Point(LastPoint); NextPoint.Move(1, direction); return(NextPoint); }
public Snake(Point tail, int length, Direction _direction) { direction = _direction; pointList = new List <Point>(); for (int tick = 0; tick < length; tick++) { Point point = new Point(tail); point.Move(tick, direction); pointList.Add(point); } }
public Snake(Point tail, int lenght, Direction _direction) : base() { direction = _direction; Hangry = true; for (int i = 0; i < lenght; i++) { Point p = new Point(tail); p.Move(i, direction); pList.Add(p); } }
private Point GetNextPoint() { Point newHead = null; Point head = _PointList.LastOrDefault(); if (head != null) { newHead = new Point(head); newHead.Move(1, Direction); } return(newHead); }
public Snake(Point tail, int length, Direction _dir) { pList = new List <Point>(); dir = _dir; for (int i = 0; i <= length; i += 1) { Point p = new Point(tail); p.Move(i, _dir); pList.Add(p); } }
public Snake(Point tail, int length, Direction _direction) { direction = _direction; pList = new List <Point>(); pList.Add(tail); for (int i = 1; i < length; i++) { Point x = new Point(tail); x.Move(i, direction); pList.Add(x); } }
public Snake(Point taile, int lenght, Direction _direction) { direction = _direction; pList = new List <Point>(); for (int i = 0; i < lenght; i++) // хвостовую точку сдвигаем в направлении direction на значение длины змейки { Point p = new Point(taile); p.Move(i, direction); pList.Add(p); } }
public Snake(Point tail, int length, Direction _direction) { direction = _direction; pList = new List<Point>(); //Snake snake = new Snake(p, 5, Direction.RIGHT); for (int i = 0; i < length; i++) { Point p = new Point(tail); p.Move(i, direction); pList.Add(p); } }
public Snake(Point tail, int lenght, Direction direction) { Direction = direction; StartLenght = lenght; _PointList = new List <Point>(); for (int i = 0; i < lenght; i++) { Point point = new Point(tail); point.Move(i, direction); _PointList.Add(point); } }
public Snake(Point snakeTail, int snakeLenght, Direction _direction) { direction = _direction; pList = new List <Point>(); for (int i = 0; i < snakeLenght; i++) { Point p = new Point(snakeTail); p.Move(i, direction); pList.Add(p); } }
public Snake(Point tail, int length, Direction direction) { this.direction = direction; this.length = length; plist = new List<Point>(); for (int iter = 0; iter < this.length; iter++) { Point p = new Point(tail); p.Move(iter, direction); plist.Add(p); } }
public Snake( Point tail, int lenght, Directions direction ) { pList = new List<Point>(); for ( int i = 0; i < lenght; i++ ) // пока не дойдем до длины { var p = new Point(tail); // Создаем точку. В первой итерации, когда I = 0, это будет начальной точкой хвостом. // В следующих итерациях, мы хвосту прибавлять точки методом Move. // Т.е. если зададим начальную точку (3;4) и укажем, что у глиста будет длина 2 и направление влево // то в первой итерации точка так и останется 3,4. Во второй итерации, мы отнимем с точки Х (она имеет значение 3) единицу. И новая точка будет иметь координаты (2;4) p.Move( i, direction ); // двигаем точку по направлению pList.Add( p ); } }
public Snake(Point tail, int lengh, Direction _direction) { direction = _direction; objectType = ObjectTypes.SNAKE; pList = new List<Point>(); for(int i = 0; i < lengh; i++) { // Пересоздаём точку и передвигаем её, тем самым рисуя змейку Point p = new Point(tail); p.Move(i, direction); pList.Add(p); Draw(); } }
private Point GetNewPoint() { Point newPoint = new Point( pList.Last() ); newPoint.Move(1, direction); return newPoint; }
public Point GetNextPoint() { Point nextLast = new Point(pList.Last()); nextLast.Move(1, direction); return nextLast; }
public Point GetNextPoint() { Point newpoint = new Point(points.Last()); newpoint.Move(1, direction); return newpoint; }