public TrailCrossing(int crossingNumber)
 {
     CrossingNumber1 = crossingNumber;
     CrossingNumber2 = -1;
     Height          = CrossingHeight.Unknown;
     Direction       = CrossingDirection.Unknown;
 }
        public List <Crossing> Sail()
        {
            var   list    = new List <Crossing>();
            Vec2i forward = new Vec2i(1, 0);

            InitializeConsole();
            PrintMap(list.Count + 1, Clearance());
            Console.ReadKey();

            while (position.X < width - 1)
            {
                var turnPosition = position;
                int count        = 0;
                while (Clearance() > 20)
                {
                    count++;
                    position += Moves[currentDirection];
                    if (position.X < width)
                    {
                        map[position.Y, position.X] = RouteSymbols[currentDirection];
                    }
                    PrintMap(list.Count + 1, Clearance());
                }
                list.Add(new Crossing(currentDirection, count));
                position        += forward;
                currentDirection = currentDirection == CrossingDirection.NorthEast ? CrossingDirection.SouthEast : CrossingDirection.NorthEast;
                radarDirection   = RadarDirection[currentDirection];
                if (position.X < width)
                {
                    map[position.Y, position.X] = RouteSymbols[currentDirection];
                    PrintMap(list.Count + 1, Clearance());
                }
            }
            PrintMap(list.Count, Clearance());
            if (Console.KeyAvailable)
            {
                Console.ReadKey();
                Console.ReadKey();
            }
            return(list);
        }
 public Crossing(CrossingDirection direction, int length)
 {
     Direction = direction;
     Length    = length;
 }