Esempio n. 1
0
 public Point GetNextPoint()
 {
     Point head = pList.Last();
     Point nextPoint = new Point(head);
     nextPoint.Move(1, dir);
     return nextPoint;
 }
Esempio n. 2
0
 public Point GetNextStep()
 {
     Point head = PointList.Last();
     Point nextPoin = new Point(head);
     nextPoin.Move(1, direct);
     return nextPoin;
 }
Esempio n. 3
0
        public Point GetNextStep()
        {
            Point head     = PointList.Last();
            Point nextPoin = new Point(head);

            nextPoin.Move(1, direct);
            return(nextPoin);
        }
Esempio n. 4
0
 public Snake(Point tail, int lenght, 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);
     }
 }
Esempio n. 5
0
 public Snake(Point tail, int lenght, Direction _dir)
 {
     dir = _dir;
     pList = new List<Point>();
     for (int i = 0; i < lenght; i++)
     {
         Point p = new Point(tail);
         p.Move(i, dir);
         pList.Add(p);
     }
 }
Esempio n. 6
0
 public Snape(Point tail , int lenght , Direction _direction)
 {
     direction = _direction;
     pLine = new List<Point>();
     for(int i = 0 ; i< lenght; i++)
     {
         Point p = new Point(tail);
         p.Move(i, _direction);
         pLine.Add(p);
     }
 }
Esempio n. 7
0
        public Snake(Point pstart, int length, Direction direction)
        {
            dir   = direction;
            pList = new List <Point>();

            for (int i = 0; i < length; i++)
            {
                Point p1 = new Point(pstart);
                p1.Move(i, dir);
                pList.Add(p1);
            }
        }
Esempio n. 8
0
        public Snake(Point tail, int length, Direction _direct)
        {
            PointList = new List<Point>();
            direct = _direct;

            for (int i = 0; i < length; i++)
            {
                Point p = new Point(tail);
                p.Move(i, direct);
                PointList.Add(p);
            }
        }
Esempio n. 9
0
        public Snake(Point tail, int length, Direction _direct)
        {
            PointList = new List <Point>();
            direct    = _direct;

            for (int i = 0; i < length; i++)
            {
                Point p = new Point(tail);
                p.Move(i, direct);
                PointList.Add(p);
            }
        }