public MainWindow() { InitializeComponent(); NumberMaze np = new NumberMaze(); numberMazeCanvas.Doc = np; }
private void drawButton_Click(object sender, RoutedEventArgs e) { NumberMaze np = numberMazeCanvas.Doc; np.Solve(); numberMazeCanvas.Velocity = velocitySlider.Value; if (np.solved) { numberMazeCanvas.draw(); } else { tbOutput.Text = "Solution not found."; } }