Пример #1
0
        private Point GetNextPoint()
        {
            Point head      = _points.Last();
            Point nextPoint = new Point(head);

            nextPoint.MoveTo(1, _direction);
            return(nextPoint);
        }
Пример #2
0
 public Snake(Point tail, int length, Direction _direction)
 {
     this._direction = _direction;
     for (int i = 0; i < length; i++)
     {
         Point p = new Point(tail);
         p.MoveTo(i, this._direction);
         _points.Add(p);
     }
 }