Example #1
0
        public Game(int mine, int dim)
        {
            Drugiprsten     = false;
            mojPanel        = new Panel();
            n               = dim;
            mojPanel.Width  = 400;
            mojPanel.Height = 400;

            _matrix = new Polje[n, n];

            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    _matrix[i, j] = new Podaci.Polje(this, i, j, false);
                }
            }


            this.generisiMine();

            _brKlikova   = 0;
            _brMina      = mine;
            _brZastavica = 13;
            BrojPoteza   = (n * n) - _brMina;
        }
Example #2
0
        public Game(int dimenzija)
        {
            Drugiprsten    = false;
            mojPanel       = new Panel();
            n              = dimenzija;// treba n=dim
            this.Niz_polja = new Polje[this.n * this.n];

            mojPanel.Width  = 400;
            mojPanel.Height = 400;

            _matrix = new Polje[n, n];

            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    _matrix[i, j] = new Podaci.Polje(this, i, j, false);
                }
            }

            _brKlikova   = 0;
            _brZastavica = 13;
            BrojPoteza   = (n * n) - _brMina;
        }