Ejemplo n.º 1
0
        private void RenderMaze()
        {
            using (var renderer = new BitmapRenderer(_configuration, _maze.Cells, TbCellWidth.NumValue, TbCellHeight.NumValue))
            {
                if (CbHighlightSolution.IsChecked.HasValue && CbHighlightSolution.IsChecked.Value)
                {
                    renderer.HighlightCells(_maze.Path.ToArray());
                }

                var bitmap = renderer.Render();
                MazeVisualization.Source = ConvertBitmapToImageSource(bitmap);
            }
        }