Пример #1
0
 internal static IGameboard GenerateFieldWithSizeTwo()
 {
     var gameboard = new Gameboard(2);
     gameboard[0, 0] = new Mine(MineRadius.MineRadiusOne);
     gameboard[0, 1] = new EmptyCell();
     gameboard[0, 1].Explode();
     gameboard[1, 0] = new EmptyCell();
     gameboard[1, 1] = new EmptyCell();
     return gameboard;
 }
Пример #2
0
 private void GenerateEmptyField(IGameboard gameboard)
 {
     int size = gameboard.Size;
     for (int row = 0; row < size; row++)
     {
         for (int col = 0; col < size; col++)
         {
             gameboard[row, col] = new EmptyCell();
         }
     }
 }
Пример #3
0
        internal static IGameboard GenerateFieldWithSizeTenWithEmptyCells()
        {
            var gameboard = new Gameboard(10);

            for (int i = 0; i < gameboard.Size; i++)
            {
                for (int k = 0; k < gameboard.Size; k++)
                {
                    gameboard[i, k] = new EmptyCell();
                }
            }

            return gameboard;
        }
Пример #4
0
        private IGameboard GenerateGameboard(int n)
        {
            IGameboard gameboard = new Gameboard(n);
            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < n; j++)
                {
                    gameboard[i, j] = new EmptyCell();
                }
            }

            IDetonationPatternFactory detonationFactory = new DetonationFactory();
            gameboard.SetDetonationFactory(detonationFactory);
            return gameboard;
        }