/// <summary> /// Creates a new maze. /// </summary> public void OnNew(object sender, EventArgs e) { #region Set up the painter. painter.Setup(); int squareWidth; int pathWidth; int wallWidth; MazePainter.SuggestWidths(painter.GridWidth, painter.VisibleWalls, out squareWidth, out pathWidth, out wallWidth); painter.Setup(squareWidth, wallWidth, pathWidth); #endregion painter.Reset(); painter.BlinkingCounter = 0; // Create and display a maze. painter.CreateMaze(null); painter.PaintMaze(null); }
/// <summary> /// Create a maze with the given specific dimensions. /// </summary> /// <remarks> /// This method is also called from the AboutBox Dialog. /// </remarks> public void Setup(int squareWidth, int wallWidth, int pathWidth) { painter.Setup(squareWidth, wallWidth, pathWidth); CreateMaze(); Reset(); }