public void NewGame(int r, int t, bool h) { if (pnFild.Controls.Count > 0) { pnFild.Controls.Clear(); } pnFild.AutoSize = true; Matrica = new ButtonMatrix(r, t, h); i = r; j = t; Button[,] b = Matrica.ReturnMatrix(); foreach (Button tmpButton in b) { pnFild.Controls.Add(tmpButton); } }
public void NewGame() { #region add-to-panel if (pnFild.Controls.Count > 0) { pnFild.Controls.Clear(); } pnFild.AutoSize = true; Matrica = new ButtonMatrix(9, 9, 10); i = j = 9; nmbOfMines = 10; Button[,] b = Matrica.ReturnMatrix(); foreach (Button tmpButton in b) { pnFild.Controls.Add(tmpButton); } #endregion }
public void NewGame(int r, int t, int no) { #region add-to-panel if (pnFild.Controls.Count > 0) { pnFild.Controls.Clear(); } pnFild.AutoSize = true; Matrica = new ButtonMatrix(r, t, no); i = r; j = t; nmbOfMines = no; Button[,] b = Matrica.ReturnMatrix(); foreach (Button tmpButton in b) { pnFild.Controls.Add(tmpButton); } #endregion }