/// <summary> /// Starts a given search type. /// </summary> /// <param name="lbl">The label output will be written to.</param> /// <param name="type">The search type to perform.</param> private void StartSearch(Label lbl, SearchType type) { var puzzle = CreatePuzzleFromInput(); if (puzzle == null) return; solver = new SliderSolver(puzzle); solver.SolvePuzzle(type); if (solver.Result == null) lbl.Text = "No Result"; UpdateLabelWithPuzzleResults(solver, lbl); if (type == SearchType.AStar) OutputPuzzleSteps(solver); }