public void PlaceMines_RemovesClickedLocationAndAreaAround(uint clickedLocationX, uint clickedLocationY, int mineCountChange) { Location clickedLocation = new(clickedLocationX, clickedLocationY); LocationShufflerToTest locationShuffler = new(mineLocations); IMinelayer minelayerUnderTest = new FirstEmptyMinelayer(locationShuffler); IEnumerable <Location> placedMines = minelayerUnderTest.PlaceMines(field, (uint)mineLocations.Length, clickedLocation); placedMines.Should().HaveCount(mineLocations.Length + mineCountChange); }
public void PlaceMines_WithBadLuck_ResultsInClickedLocationIsNoMine(uint clickedLocationX, uint clickedLocationY) { Location clickedLocation = new(clickedLocationX, clickedLocationY); LocationShufflerToTest locationShuffler = new(mineLocations); IMinelayer minelayerUnderTest = new FirstEmptyMinelayer(locationShuffler); IEnumerable <Location> placedMines = minelayerUnderTest.PlaceMines(field, (uint)mineLocations.Length, clickedLocation); placedMines.Should().NotContain(clickedLocation); }