public void GenerateMaze() { if (currentAlgorithm != null) { currentAlgorithm.End(); } currentAlgorithm = algorithms[MazeInput.Instance.ChosenAlgorithm]; currentAlgorithm.Begin(); }