public void UpdateTheStatusOfACellToRecordAMineAsFalse() { //Arrange var gridSize = 2; var newGame = GridFactory.NewGameGrid(gridSize); var updateMineStatus = new MineUpdater(); var mineStub = new StubForMineLocationZeroZero(); //Act updateMineStatus.UpdateCellWithMineStatus(mineStub.MineLocations(newGame.Size), newGame); //Assert Assert.False(newGame.GeneratedGameCell[1, 1].IsMine); }
public void ReturnTrueIfPlayerHasSelectedAMine() { //Arrange var size = 2; var newValidation = Factory.NewUserInputValidation(); var gameGrid = GridFactory.NewGameGrid(size); var userInput = new PlayerMove(0, 0); var updateMineStatus = new MineUpdater(); var mineStub = new StubForMineLocationZeroZero(); //Act updateMineStatus.UpdateCellWithMineStatus(mineStub.MineLocations(gameGrid.Size), gameGrid); //Assert Assert.True(newValidation.IsGameOver(gameGrid, userInput)); }