public void SmoothTerrain(int iterations) { float[,] heightmap = GetTerrainHeight(); Smooth.Apply(heightmap, iterations); UpdateTerrainHeight(heightmap); }
public void Smooth_ShouldBeEqualSmoothedHeighmap(string originalHeightmap, string smoothedHeightmap) { // Arrange float[,] actualHeighmap = ReadHeightMap(originalHeightmap); float[,] expectedHeighmap = ReadHeightMap(smoothedHeightmap); // Act Smooth.Apply(actualHeighmap, iterations); // Assert AreEqual(actualHeighmap, expectedHeighmap, allowedDifference).Should().Be(true); }