Example #1
0
        // Maze rendering to UI help: http://www.c-sharpcorner.com/UploadFile/mgold/Maze09222005021857AM/Maze.aspx
        public Form1()
        {
            InitializeComponent();

            SetBounds(Left, Top, (Dimensions + 2)*CellSize + CellPadding, (Dimensions + 5)*CellSize + CellPadding);

            Cursor = Cursors.WaitCursor;

            var generator = new Generator.Generator(Dimensions);
            _maze = generator.Generate();

            Cursor = Cursors.Arrow;
        }
Example #2
0
 private void From1_DoubleClick(object sender, MouseEventArgs e)
 {
     Cursor = Cursors.WaitCursor;
     var solver = new Solver.Solver(_maze);
     _maze = solver.Solve();
     this.Refresh();
     Cursor = Cursors.Arrow;
 }