private void StartNewGame() { _board = new MineSweeperBoard(); pnlGame.Enabled = true; ResetCells(); }
public void CountRandomMines() { _board = new MineSweeperBoard(); Assert.AreEqual(10, GetNumberOfMines()); }
public void TestRandomnessOfMineLocations() { _board = new MineSweeperBoard(); MineSweeperBoard board2 = new MineSweeperBoard(); Assert.False(AreMineLocationdOnBoardsEqual(_board, board2), "Locations are not random."); }
private bool AreMineLocationdOnBoardsEqual(MineSweeperBoard mineSweeperBoard1, MineSweeperBoard mineSweeperBoard2) { for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { if (mineSweeperBoard1.minedCells[i, j] != mineSweeperBoard2.minedCells[i, j]) { return false; } } } return true; }
public void TestInitialize() { _board = new MineSweeperBoard(); SetDefaultMines(); }