Esempio n. 1
0
        public Point GetNextPoint()
        {
            Point head      = pList.Last();
            Point nextPoint = new Point(head);

            nextPoint.MovePoint(1, direction);
            return(nextPoint);
        }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 private Point GetNextPoint()
 {
     nextPoint = new Point(pointsList.Last());
     nextPoint.MovePoint(1, direction);
     return(nextPoint);
 }