public void TestCellIsEmpty_WithEmptyCells() { ConsoleBattleField testGame = new ConsoleBattleField(); testGame.InitializeGameField(10); var fieldCopy = testGame.GameFieldCopy; for (int row = 0; row < 10; row++) { for (int col = 0; col < 10; col++) { if (fieldCopy[row, col] == FieldCell.EmptyCell) { Assert.IsTrue(testGame.CellIsEmpty(row, col)); } } } }
public void TestCellIsDetonated_WithNoDetonatedCells() { ConsoleBattleField testGame = new ConsoleBattleField(); testGame.InitializeGameField(10); testGame.GenerateMines(); for (int row = 0; row < 10; row++) { for (int col = 0; col < 10; col++) { if (testGame.CellIsMine(row, col) || testGame.CellIsEmpty(row, col)) { Assert.IsFalse(testGame.CellIsDetonated(row, col)); } } } }