Beispiel #1
0
        private static void BuildMasked()
        {
            Grid grid = MaskedGridBuilder.MakeCircle(13, 23);

            var mazeBuilder = new AldousBorderWilsons();

            mazeBuilder.Build(grid);

            Console.WriteLine(GridTextConversion.ToText(grid));
            var gd     = GridDisplayFactory.GetDisplayForGrid(grid);
            var bitmap = gd.MakeImage();

            bitmap.Save("mask.png", ImageFormat.Png);
        }
Beispiel #2
0
        private static void BuildPolar()
        {
            Console.WriteLine("Polar");

            var grid = PolarGrid.CreatePolarGrid(40);

            var mazeBuilder = new RecursiveBacktracker();

            mazeBuilder.Build(grid);

            var distances = Distances.Build(grid.GetCell(0, 0));

            var gd     = GridDisplayFactory.GetDisplayForGrid(grid);
            var bitmap = gd.MakeImage(distances);

            bitmap.Save("Polar.png", ImageFormat.Png);
            Console.WriteLine("Done");
        }