Exemplo n.º 1
0
        public IMinerGame NewRandomGame(string playerName, Tuple<int, int> rowsCols, int bombs)
        {
            MinerGame game = new MinerGame(rowsCols);

            // установка бомб
            Random rand = new Random();
            while (game.CountBomb < bombs)
            {
                game.SetBomb(rand.Next(0, rowsCols.Item1 - 1), rand.Next(0, rowsCols.Item2 - 1));
            }
            game.SetCanMakeBomb(false);

            return game;
        }
Exemplo n.º 2
0
        public IMinerGame NewRandomGame(string playerName, Tuple <int, int> rowsCols, int bombs)
        {
            MinerGame game = new MinerGame(rowsCols);

            // установка бомб
            Random rand = new Random();

            while (game.CountBomb < bombs)
            {
                game.SetBomb(rand.Next(0, rowsCols.Item1 - 1), rand.Next(0, rowsCols.Item2 - 1));
            }
            game.SetCanMakeBomb(false);

            return(game);
        }
Exemplo n.º 3
0
 public IMinerGame NewEmptyGame(string playerName, Tuple<int, int> rowsCols)
 {
     MinerGame game = new MinerGame(rowsCols);
     return game;
 }
Exemplo n.º 4
0
        public IMinerGame NewEmptyGame(string playerName, Tuple <int, int> rowsCols)
        {
            MinerGame game = new MinerGame(rowsCols);

            return(game);
        }