mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 08:44:50 +00:00
Integrate lane A plunge pools
- Merge lane A Task 15 (6aafec196,90205dc5f): plunge pools below falls, junction seam and tongue fixes, outlet zone step hold. - No textual conflicts; ConfluenceIncisionTest keeps the integration MAX_WALL_CUT of 29 beside lane A's shared valley scene and tongue test. - Pinned constants unchanged: schema digest, hydrology fingerprint and golden hashes pass as merged.
This commit is contained in:
commit
f76bb19597
11 files changed
+523
-79
No files matched your search
+20
-1
@@ -6,6 +6,7 @@ import art.arcane.iris.generation.hydrology.water.Pond;
|
||||
import art.arcane.iris.generation.hydrology.water.PondPlanner;
|
||||
import art.arcane.iris.generation.hydrology.water.Reach;
|
||||
import art.arcane.iris.generation.hydrology.water.ReachShaper;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -26,10 +27,16 @@ public class ConfluenceIncisionTest {
|
||||
private static final double WALL_FACE_REACH = 24D;
|
||||
private static final double MAX_WALL_CUT = 29D;
|
||||
private static final int MAX_COPY_DIFFERENCE = 4;
|
||||
private static PlannedScene valley;
|
||||
|
||||
@AfterClass
|
||||
public static void dropScene() {
|
||||
valley = null;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void junctionPoolsNeverTrenchASlopingValley() {
|
||||
PlannedScene scene = PlannedScene.plan(SyntheticTerrain.valleySlope(), settings(), 2, 2);
|
||||
PlannedScene scene = valley();
|
||||
int points = 0;
|
||||
int deep = 0;
|
||||
String worst = "";
|
||||
@@ -52,6 +59,11 @@ public class ConfluenceIncisionTest {
|
||||
assertEquals("reach points cut more than " + DEEP_CUT + " below the valley floor, deepest " + worst, 0, deep);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void slopingValleyConfluencesHaveNoTongues() {
|
||||
assertEquals("confluence tongues on the sloping valley over 2x2 windows", List.of(), WaterInvariants.confluenceTongues(valley()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void majorDownAWallBesideTheValleyRiverFollowsTheWall() {
|
||||
SyntheticTerrain terrain = SyntheticTerrain.valleyBelowAWall(WALL_FOOT, WALL_RUN, WALL_HEIGHT);
|
||||
@@ -115,6 +127,13 @@ public class ConfluenceIncisionTest {
|
||||
assertTrue("grades of one reach differ by " + worst + " between the windows that plan it: " + worstCopy, worst <= MAX_COPY_DIFFERENCE);
|
||||
}
|
||||
|
||||
private static synchronized PlannedScene valley() {
|
||||
if (valley == null) {
|
||||
valley = PlannedScene.plan(SyntheticTerrain.valleySlope(), settings(), 2, 2);
|
||||
}
|
||||
return valley;
|
||||
}
|
||||
|
||||
private static HydrologySettings settings() {
|
||||
return HydrologySettings.compile(new IrisHydrology(), SEED, SyntheticTerrain.SEA_LEVEL, SyntheticTerrain.MIN_Y, SyntheticTerrain.MAX_Y);
|
||||
}
|
||||
|
||||
@@ -40,6 +40,12 @@ public class PlannedSceneTest {
|
||||
WaterInvariants.detachedOutlets(openFractal()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void confluencesHaveNoTongues() {
|
||||
assertEquals("confluence tongues on openFractal(1) with rainfall " + RAINFALL + " over 2x2 windows", List.of(),
|
||||
WaterInvariants.confluenceTongues(openFractal()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void feedersAtALedInOutletsExitPoolBesideTheLeadIn() {
|
||||
PlannedScene scene = openFractal();
|
||||
|
||||
+94
@@ -19,6 +19,7 @@ import art.arcane.iris.generation.hydrology.water.Pond;
|
||||
import art.arcane.iris.generation.hydrology.water.PondKind;
|
||||
import art.arcane.iris.generation.hydrology.water.PondMask;
|
||||
import art.arcane.iris.generation.hydrology.water.Reach;
|
||||
import art.arcane.iris.generation.hydrology.water.ReachShaper;
|
||||
import art.arcane.iris.generation.hydrology.water.ReachStyle;
|
||||
import art.arcane.iris.generation.hydrology.water.ShapedNetwork;
|
||||
import art.arcane.iris.generation.terrain.IrisMaterialPalette;
|
||||
@@ -275,6 +276,28 @@ public class ChunkWaterRasterTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fallsIntoAPondLeaveItsFloor() {
|
||||
IntBinaryOperator natural = (x, z) -> 70 + ((x - 16) * (x - 16) + (z - 16) * (z - 16)) / 20;
|
||||
Pond pond = pond(21L, PondKind.NATURAL, 75, circle(16, 16, 14, 4), 16, 16, 0);
|
||||
HydrologyTier stream = tier("stream", 1.5f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
Scene level = new Scene(settings(new IrisHydrology()), natural).pond(pond).reach(line(23L, stream, 0L, 16f, -48f, 16f, 6f, (x, z) -> 75));
|
||||
Scene falling = new Scene(settings(new IrisHydrology()), natural).pond(pond).reach(line(23L, stream, 0L, 16f, -48f, 16f, 6f, (x, z) -> 86));
|
||||
int checked = 0;
|
||||
for (int x = -8; x < 40; x++) {
|
||||
for (int z = -8; z < 40; z++) {
|
||||
if (falling.role(x, z) != WaterRole.POND) {
|
||||
continue;
|
||||
}
|
||||
checked++;
|
||||
assertEquals("pond floor under the fall at " + x + "," + z, level.terrain(x, z), falling.terrain(x, z));
|
||||
}
|
||||
}
|
||||
assertTrue("pond columns " + checked, checked > 400);
|
||||
assertEquals("the stream falls into the pond", 86, falling.head(16, -2));
|
||||
assertEquals(74, falling.head(16, 6));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pondColumnsShareOneLevel() {
|
||||
IntBinaryOperator natural = (x, z) -> 70 + ((x - 16) * (x - 16) + (z - 16) * (z - 16)) / 20;
|
||||
@@ -615,6 +638,26 @@ public class ChunkWaterRasterTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void stepsAtTheEdgeOfALowerChannelAreStyledAsFalls() {
|
||||
HydrologyTier river = tier("river", 8f, 1f, 16, IrisBankStyle.SMOOTH);
|
||||
HydrologyTier stream = tier("stream", 2f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
Reach lower = line(302L, river, 0L, -96f, 8f, 120f, 8f, (x, z) -> 66);
|
||||
Map<Integer, WaterRole> styles = Map.of(68, WaterRole.CASCADE, 70, WaterRole.CASCADE, 72, WaterRole.WATERFALL);
|
||||
for (int level : new int[]{68, 70, 72}) {
|
||||
Reach perched = line(303L, stream, 0L, 16f, -72f, 16f, 8f, (x, z) -> level);
|
||||
Scene scene = new Scene(settings(new IrisHydrology()), (x, z) -> 80).reach(lower).reach(perched);
|
||||
for (int x = 15; x <= 17; x++) {
|
||||
assertEquals(level, scene.head(x, -1));
|
||||
assertEquals(66, scene.head(x, 0));
|
||||
assertEquals("the " + (level - 66) + "-block step onto the lower channel's edge at x " + x, styles.get(level), scene.role(x, 0));
|
||||
assertEquals("the perched channel above the step at x " + x, WaterRole.CHANNEL, scene.role(x, -1));
|
||||
}
|
||||
assertEquals("the lower channel away from the step", WaterRole.CHANNEL, scene.role(40, 0));
|
||||
assertEquals("the lower channel inside the perched channel's footprint", WaterRole.CHANNEL, scene.role(16, 6));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void crossWindowLinkNeverRaisesWaterDownstream() {
|
||||
HydrologyTier narrow = tier("river", 2f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
@@ -845,6 +888,54 @@ public class ChunkWaterRasterTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void crossWindowFedStartOneBlockAboveTheJunctionJoinsIt() {
|
||||
HydrologyTier narrow = tier("river", 2f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
HydrologyTier wide = tier("river", 3f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
Reach low = line(342L, wide, 0L, 504f, 200f, 600f, 200f, (x, z) -> 61);
|
||||
Reach stub = line(341L, narrow, low.id(), 498f, 200f, 504f, 200f, (x, z) -> 62);
|
||||
Reach upstream = line(340L, narrow, stub.id(), 440f, 200f, 498f, 200f, (x, z) -> 62);
|
||||
assertEquals(new WindowKey(0, 0), WindowKey.containing(504, 200));
|
||||
assertEquals(new WindowKey(1, 0), WindowKey.containing(600, 200));
|
||||
Scene scene = new Scene(settings(new IrisHydrology()), (x, z) -> 90).reach(upstream).reach(stub).reach(low);
|
||||
assertEquals("the stub's start one block above the junction joins it", 60, scene.head(498, 200));
|
||||
int previous = Integer.MAX_VALUE;
|
||||
for (int x = 440; x <= 600; x++) {
|
||||
int head = scene.head(x, 200);
|
||||
assertNotEquals("centre line is water at x=" + x, Integer.MIN_VALUE, head);
|
||||
assertTrue("water rises from " + previous + " to " + head + " at x=" + x, head <= previous);
|
||||
if (head < previous && previous != Integer.MAX_VALUE) {
|
||||
assertEquals("the step at x=" + x + " is styled", WaterRole.CASCADE, scene.role(x, 200));
|
||||
}
|
||||
previous = head;
|
||||
}
|
||||
assertWindowOrderFree(scene, 27, 37, 12);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void crossWindowSettlingKeepsAStepAtTheEndOfAnOutletZone() {
|
||||
HydrologyTier narrow = tier("river", 2f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
HydrologyTier wide = tier("river", 3f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
Reach low = line(332L, wide, 0L, 504f, 200f, 600f, 200f, (x, z) -> 62);
|
||||
Reach drawn = line(331L, narrow, low.id(), 492f, 200f, 504f, 200f, (x, z) -> x < 500f ? 66 : 65);
|
||||
boolean[] zone = new boolean[drawn.xs().length];
|
||||
for (int point = 0; point < zone.length; point++) {
|
||||
zone[point] = drawn.xs()[point] - drawn.xs()[0] <= 8f;
|
||||
}
|
||||
ReachStyle[] style = ReachShaper.styles(drawn.grade(), new boolean[zone.length], zone, narrow.waterfallMinimumDrop(), SEA_LEVEL);
|
||||
assertEquals("the last outlet zone point steps down one block, shown as two", ReachStyle.CASCADE, style[4]);
|
||||
assertTrue("the step lies at the end of the outlet zone", zone[4] && !zone[5]);
|
||||
Reach outlet = new Reach(drawn.id(), narrow, drawn.downstreamId(), drawn.xs(), drawn.zs(), drawn.grade(), drawn.halfWidth(), drawn.depth(),
|
||||
style, drawn.catchment());
|
||||
Scene scene = new Scene(settings(new IrisHydrology()), (x, z) -> 75).reach(outlet).reach(low);
|
||||
for (int x = 492; x <= 498; x++) {
|
||||
assertEquals("outlet zone water at x=" + x, 66, scene.head(x, 200));
|
||||
}
|
||||
assertEquals("the outlet zone keeps the step at its last point", 64, scene.head(500, 200));
|
||||
assertEquals(62, scene.head(502, 200));
|
||||
assertWindowOrderFree(scene, 30, 32, 12);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void crossWindowSettlingKeepsAnOutletsHeldLipAtThePondLevel() {
|
||||
HydrologyTier narrow = tier("river", 2f, 0.5f, 4, IrisBankStyle.SMOOTH);
|
||||
@@ -1119,6 +1210,9 @@ public class ChunkWaterRasterTest {
|
||||
if (scene.role(x, z) == WaterRole.MOUTH) {
|
||||
mouths++;
|
||||
assertEquals(banks + "mouth at sea level at " + x + "," + z, SEA_LEVEL, scene.head(x, z));
|
||||
if (x >= 40) {
|
||||
assertEquals(banks + "the fall leaves the sea floor under the mouth at " + x + "," + z, coast.applyAsInt(x, z), scene.terrain(x, z));
|
||||
}
|
||||
}
|
||||
if (scene.water(x, z)) {
|
||||
continue;
|
||||
|
||||
+118
-4
@@ -67,6 +67,99 @@ public class RiffleProfileTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fallsKeepADeepPlungePoolBelowTheCurtain() {
|
||||
Surface surface = new Surface((x, z) -> x < 0 ? 110 : 98);
|
||||
for (int z = -8; z <= 8; z++) {
|
||||
for (int original : new int[]{92, 96}) {
|
||||
String bed = original + " bed at z " + z;
|
||||
assertEquals("lip sill for the " + bed, 109, surface.bed(-1, z, original));
|
||||
assertTrue("plunge pool at the foot for the " + bed, surface.bed(0, z, original) <= 95);
|
||||
assertTrue("deepest at the foot for the " + bed, surface.bed(0, z, original) <= surface.bed(6, z, original));
|
||||
for (int x = 0; x <= 20; x++) {
|
||||
int here = surface.bed(x, z, original);
|
||||
assertTrue("pool at " + x + " stays below the " + bed, here <= original);
|
||||
assertTrue("downstream face at " + x + " in the " + bed, Math.abs(here - surface.bed(x + 1, z, original)) <= 2);
|
||||
}
|
||||
assertEquals(original, surface.bed(17, z, original));
|
||||
}
|
||||
assertTrue("the bowl cuts below a shallow bed at z " + z, surface.bed(0, z, 96) <= 94);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void plungeFieldsMatchAcrossChunkBorders() {
|
||||
IntBinaryOperator heads = (x, z) -> x + z < -7 ? 110 : 98;
|
||||
Surface surface = new Surface(heads);
|
||||
for (int x = -24; x <= 16; x++) {
|
||||
assertTrue("the foot at " + x + "," + (-7 - x) + " is carved", surface.bed(x, -7 - x, 96) < 96);
|
||||
}
|
||||
for (int chunkX = -2; chunkX <= 1; chunkX++) {
|
||||
for (int chunkZ = -2; chunkZ <= 1; chunkZ++) {
|
||||
RiffleProfile first = new RiffleProfile(chunkX, chunkZ, channel(heads));
|
||||
RiffleProfile east = new RiffleProfile(chunkX + 1, chunkZ, channel(heads));
|
||||
RiffleProfile south = new RiffleProfile(chunkX, chunkZ + 1, channel(heads));
|
||||
for (int edge = 0; edge < 16; edge++) {
|
||||
for (int original : new int[]{92, 96}) {
|
||||
int x = (chunkX + 1) << 4;
|
||||
int z = (chunkZ << 4) + edge;
|
||||
double variation = BedProfile.variation(1337L, x, z);
|
||||
assertEquals(first.bed(16, edge, original, heads.applyAsInt(x, z), variation),
|
||||
east.bed(0, edge, original, heads.applyAsInt(x, z), variation));
|
||||
x = (chunkX << 4) + edge;
|
||||
z = (chunkZ + 1) << 4;
|
||||
variation = BedProfile.variation(1337L, x, z);
|
||||
assertEquals(first.bed(edge, 16, original, heads.applyAsInt(x, z), variation),
|
||||
south.bed(edge, 0, original, heads.applyAsInt(x, z), variation));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void plungeSkipsStandingWaterAndMouths() {
|
||||
IntBinaryOperator heads = (x, z) -> x < 0 ? 110 : 98;
|
||||
IntBinaryOperator features = (x, z) -> x < 0 ? 1 : 2;
|
||||
for (WaterRole standing : new WaterRole[]{WaterRole.POND, WaterRole.MOUTH, WaterRole.INLET}) {
|
||||
Surface surface = new Surface(heads, water(heads, features, (x, z) -> x < 0 ? WaterRole.CHANNEL : standing));
|
||||
for (int z = -8; z <= 8; z++) {
|
||||
assertEquals(standing + " lip sill at z " + z, 109, surface.bed(-1, z, 92));
|
||||
for (int x = 0; x <= 20; x++) {
|
||||
assertEquals(standing + " floor at " + x + "," + z, 92, surface.bed(x, z, 92));
|
||||
assertEquals(standing + " shallow floor at " + x + "," + z, 96, surface.bed(x, z, 96));
|
||||
}
|
||||
}
|
||||
}
|
||||
Surface beside = new Surface(heads, water(heads, (x, z) -> x < 0 ? 1 : z < 0 ? 2 : 3,
|
||||
(x, z) -> x >= 0 && z >= 0 ? WaterRole.POND : WaterRole.CHANNEL));
|
||||
for (int z = -8; z <= 8; z++) {
|
||||
for (int x = 0; x <= 20; x++) {
|
||||
if (z >= 0) {
|
||||
assertEquals("pond floor beside a carved channel foot at " + x + "," + z, 96, beside.bed(x, z, 96));
|
||||
}
|
||||
}
|
||||
if (z < 0) {
|
||||
assertTrue("channel foot beside the pond at z " + z, beside.bed(0, z, 96) < 96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void receivingChannelKeepsItsBedBelowAJoiningCascade() {
|
||||
IntBinaryOperator heads = (x, z) -> x < 0 ? 104 : 100;
|
||||
Surface joining = new Surface(heads, water(heads, (x, z) -> x < 0 ? 2 : 1, (x, z) -> WaterRole.CHANNEL));
|
||||
for (int z = -8; z <= 8; z++) {
|
||||
assertEquals("the joining channel keeps its lip sill at z " + z, 103, joining.bed(-1, z, 96));
|
||||
assertTrue("the joining channel's approach rises toward its lip at z " + z, joining.bed(-6, z, 96) > 96);
|
||||
for (int x = 0; x <= 20; x++) {
|
||||
assertEquals("receiving bed at " + x + "," + z, 96, joining.bed(x, z, 96));
|
||||
}
|
||||
}
|
||||
Surface outlet = new Surface(heads, water(heads, (x, z) -> x < 0 ? 2 : 1, (x, z) -> x < 0 ? WaterRole.POND : WaterRole.CHANNEL));
|
||||
assertEquals("a channel below a pond's shore still rises toward the lip", 99, outlet.bed(0, 0, 96));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyDisconnectedPoolsKeepTheirDepth() {
|
||||
Surface surface = new Surface((x, z) -> z == 0 ? DRY : z > 0 ? 100 : x < 0 ? 100 : 98);
|
||||
@@ -97,9 +190,9 @@ public class RiffleProfileTest {
|
||||
IntBinaryOperator heads = (x, z) -> x + z < -7 ? 100 : 98;
|
||||
for (int chunkX = -2; chunkX <= 1; chunkX++) {
|
||||
for (int chunkZ = -2; chunkZ <= 1; chunkZ++) {
|
||||
RiffleProfile first = new RiffleProfile(chunkX, chunkZ, heads);
|
||||
RiffleProfile east = new RiffleProfile(chunkX + 1, chunkZ, heads);
|
||||
RiffleProfile south = new RiffleProfile(chunkX, chunkZ + 1, heads);
|
||||
RiffleProfile first = new RiffleProfile(chunkX, chunkZ, channel(heads));
|
||||
RiffleProfile east = new RiffleProfile(chunkX + 1, chunkZ, channel(heads));
|
||||
RiffleProfile south = new RiffleProfile(chunkX, chunkZ + 1, channel(heads));
|
||||
for (int edge = 0; edge < 16; edge++) {
|
||||
int x = (chunkX + 1) << 4;
|
||||
int z = (chunkZ << 4) + edge;
|
||||
@@ -116,19 +209,40 @@ public class RiffleProfileTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static RiffleProfile.Water channel(IntBinaryOperator heads) {
|
||||
return water(heads, (x, z) -> 1, (x, z) -> WaterRole.CHANNEL);
|
||||
}
|
||||
|
||||
private static RiffleProfile.Water water(IntBinaryOperator heads, IntBinaryOperator features, Roles roles) {
|
||||
return (x, z, sample) -> {
|
||||
int head = heads.applyAsInt(x, z);
|
||||
sample.set(head, features.applyAsInt(x, z), head == DRY ? WaterRole.NONE : roles.at(x, z));
|
||||
};
|
||||
}
|
||||
|
||||
private interface Roles {
|
||||
WaterRole at(int x, int z);
|
||||
}
|
||||
|
||||
private static final class Surface {
|
||||
private final IntBinaryOperator heads;
|
||||
private final RiffleProfile.Water water;
|
||||
private final Map<Long, RiffleProfile> chunks = new HashMap<>();
|
||||
|
||||
private Surface(IntBinaryOperator heads) {
|
||||
this(heads, channel(heads));
|
||||
}
|
||||
|
||||
private Surface(IntBinaryOperator heads, RiffleProfile.Water water) {
|
||||
this.heads = heads;
|
||||
this.water = water;
|
||||
}
|
||||
|
||||
private int bed(int x, int z, int original) {
|
||||
int cx = x >> 4;
|
||||
int cz = z >> 4;
|
||||
long key = ((long) cx << 32) | (cz & 0xFFFFFFFFL);
|
||||
RiffleProfile profile = chunks.computeIfAbsent(key, ignored -> new RiffleProfile(cx, cz, heads));
|
||||
RiffleProfile profile = chunks.computeIfAbsent(key, ignored -> new RiffleProfile(cx, cz, water));
|
||||
return profile.bed(x & 15, z & 15, original, heads.applyAsInt(x, z), BedProfile.variation(1337L, x, z));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1581,10 +1581,30 @@ public class ReachShaperTest {
|
||||
|
||||
int[] grade = {62, 62, 62, 40, 40};
|
||||
boolean[] ocean = {false, false, false, true, true};
|
||||
ReachStyle[] styles = ReachShaper.styles(grade, ocean, new boolean[grade.length], 6);
|
||||
ReachStyle[] styles = ReachShaper.styles(grade, ocean, new boolean[grade.length], 6, SEA_LEVEL);
|
||||
assertEquals(List.of(ReachStyle.RUN, ReachStyle.RUN, ReachStyle.WATERFALL, ReachStyle.MOUTH, ReachStyle.MOUTH), List.of(styles));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void heldLipStepThatShowsAsTwoBlocksIsACascade() {
|
||||
int[] grade = {76, 76, 76, 75, 75};
|
||||
boolean[] ocean = new boolean[grade.length];
|
||||
boolean[] held = {true, true, true, false, false};
|
||||
assertEquals("a one-block step off a held lip that the even head snap shows as two blocks",
|
||||
List.of(ReachStyle.POND_OUTLET, ReachStyle.POND_OUTLET, ReachStyle.POND_OUTLET, ReachStyle.CASCADE, ReachStyle.RUN),
|
||||
List.of(ReachShaper.styles(grade, ocean, held, 6, SEA_LEVEL)));
|
||||
assertEquals("the same step hidden by the head snap", ReachStyle.RIFFLE, ReachShaper.styles(grade, ocean, held, 6, SEA_LEVEL + 1)[3]);
|
||||
assertEquals("a one-block step that leaves no held lip", ReachStyle.RIFFLE,
|
||||
ReachShaper.styles(grade, ocean, new boolean[grade.length], 6, SEA_LEVEL)[3]);
|
||||
int[] zoned = {78, 78, 77, 77, 77};
|
||||
boolean[] zone = {true, true, true, true, false};
|
||||
assertEquals("a one-block step inside an outlet zone that the head snap shows as two blocks",
|
||||
List.of(ReachStyle.POND_OUTLET, ReachStyle.POND_OUTLET, ReachStyle.CASCADE, ReachStyle.POND_OUTLET, ReachStyle.RUN),
|
||||
List.of(ReachShaper.styles(zoned, ocean, zone, 6, SEA_LEVEL)));
|
||||
assertEquals("the same step inside the zone hidden by the head snap", ReachStyle.POND_OUTLET,
|
||||
ReachShaper.styles(zoned, ocean, zone, 6, SEA_LEVEL + 1)[2]);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void channelWaterStaysBelowNaturalGroundOnSmoothValleys() {
|
||||
HydrologySettings settings = settings(config -> {
|
||||
|
||||
Reference in new issue
Block a user