コード例 #1
0
        public void TestHuntAndKillColored()
        {
            var coloredGrid = new ColoredGrid(25, 25);

            HuntAndKill.On(coloredGrid);
            coloredGrid.Distances = coloredGrid.GetCenterCell().Distances;
            coloredGrid.ToBitmap().Save("huntandkill-colored.png");
        }
コード例 #2
0
        public void TestBinaryTreeColoredGrid()
        {
            var coloredGrid = new ColoredGrid(25, 25);

            Sidewinder.On(coloredGrid);
            coloredGrid.Distances = coloredGrid.GetCenterCell().Distances;
            coloredGrid.ToBitmap().Save("sidewinder-colored.png");
        }
コード例 #3
0
        public void TestGrowingTreeColored()
        {
            var coloredGrid = new ColoredGrid(25, 25);

            GrowingTree.On(coloredGrid);
            coloredGrid.Distances = coloredGrid.GetCenterCell().Distances;
            coloredGrid.ToBitmap().Save("growingtree-colored.png");
        }
コード例 #4
0
        public void TestRecursiveBacktrackerColored()
        {
            var coloredGrid = new ColoredGrid(25, 25);

            RecursiveBacktracker.On(coloredGrid);
            coloredGrid.Distances = coloredGrid.GetCenterCell().Distances;
            coloredGrid.ToBitmap().Save("recursivebacktracker-colored.png");
        }
コード例 #5
0
        public void TestBinaryTreeColoredGrid()
        {
            BinaryTree.On(grid);
            grid.Distances = grid.GetCenterCell().Distances;
            var bitmap = grid.ToBitmap();

            Assert.IsNotNull(bitmap);
        }
コード例 #6
0
        public void TestRecursiveDivisionColoredGrid()
        {
            var coloredGrid = new ColoredGrid(25, 25);

            RecursiveDivision.On(coloredGrid);
            coloredGrid.Distances = coloredGrid.GetCenterCell().Distances;
            coloredGrid.ToBitmap().Save("recursivedivision-colored.png");
        }
コード例 #7
0
        public void TestAldousBroderColored()
        {
            var coloredGrid = new ColoredGrid(25, 25);

            AldousBroder.On(coloredGrid);
            coloredGrid.Distances = coloredGrid.GetCenterCell().Distances;
            coloredGrid.ToBitmap().Save("aldousbroder-colored.png");
        }
コード例 #8
0
        public void TestWilsonsColoredGrid()
        {
            var coloredGrid = new ColoredGrid(25, 25);

            Wilsons.On(coloredGrid);
            coloredGrid.Distances = coloredGrid.GetCenterCell().Distances;
            coloredGrid.ToBitmap().Save("wilsons-colored.png");
        }
コード例 #9
0
ファイル: Program.cs プロジェクト: moggoly/Mazes
        private ColoredGrid ShortestPath(ColoredGrid maze)
        {
            var start     = maze.GetCenterCell();
            var distances = start.Distances();

            maze.Distances = distances;
            //maze.Distances = distances.PathTo(maze.GetCell(maze.Rows - 1, maze.Columns - 1));
            return(maze);
        }