/// <summary> /// The constructor of the class /// </summary> /// <param name="rows">The number of rows of the grid</param> /// <param name="columns">The number of columns of the grid</param> /// <param name="seed">The seed of the grid</param> public MazeGrid(int rows, int columns, int?seed) { Rows = rows; Columns = columns; Random = new Random(seed ?? ThreadSafeRandom.Next(int.MinValue, int.MaxValue)); ThreadSafeRandom.ReplaceRandom(Random); PrepareGrid(); ConfigureCells(); }