Beispiel #1
0
        public void AllNonBombsUncovered_NoneUncovered_ReturnsFalse()
        {
            Minefield minefield = new Minefield(DEFAULT_FIELD_SIZE);

            minefield.AddBombs(DEFAULT_BOMBS);
            Assert.IsFalse(minefield.AllNonBombsUncovered());
        }
Beispiel #2
0
        public void AllNonBombsUncovered_AllUncoveredNoBombs_ReturnsTrue()
        {
            Minefield minefield = new Minefield(DEFAULT_FIELD_SIZE);

            minefield.UncoverNode(0, 0);

            Assert.IsTrue(minefield.AllNonBombsUncovered());
        }
Beispiel #3
0
        public void AllNonBombsUncovered_OnlyBombsInField_ReturnsTrue()
        {
            Minefield minefield = new Minefield(DEFAULT_FIELD_SIZE);

            minefield.AddBombs(DEFAULT_FIELD_SIZE * DEFAULT_FIELD_SIZE); // Filling the field with bombs.

            Assert.IsTrue(minefield.AllNonBombsUncovered());
        }