Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            #region Пошаговое отображение установки дорог
            //while (true)
            //{
            //    LabyrinthCreator labyrinthCreator = new LabyrinthCreator();
            //    LabyrinthWriter writer = new LabyrinthWriter(labyrinthCreator);

            //    var lab = labyrinthCreator.CreateLabyrinth(20, 0, 1, 2, 3);

            //    writer.ShowLabyrinth(lab);
            //    Console.ReadKey();
            //}
            #endregion

            #region Мгновенный показ результата
            while (true)
            {
                LabyrinthCreator labyrinthCreator = new LabyrinthCreator();
                LabyrinthWriter  writer           = new LabyrinthWriter();

                var lab = labyrinthCreator.CreateLabyrinth(25, 0, 1, 2, 3);
                writer.ShowLabyrinth(lab);

                Console.ReadKey();
                Console.Clear();
            }
            #endregion
        }
Ejemplo n.º 2
0
 public LabyrinthWriter(LabyrinthCreator labyrinthCreator)
 {
     labyrinthCreator.SetRoad += OnSetRoad;
 }