Beispiel #1
0
        public void CheckIfCountRemainingMinesGivesANumberThatIsNotZeroAtTheStartOfTheGame()
        {
            var testFieldSize = 9;
            var field = new Field(testFieldSize);

            field.GenerateField();
            field.PositionMines();

            var countMines = 0;

            for (int i = 0; i < testFieldSize; i++)
            {
                for (int j = 0; j < testFieldSize; j++)
                {
                    if (field.FieldPositions[i, j] is Mine)
                    {
                        countMines++;
                    }
                }
            }

            Assert.AreNotEqual(field.CountRemainingMines(), 0);
        }