Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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
        }
Exemple #3
0
        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
        }