From 9c49af57cb826961ad396bddb6b67123d1dd3849 Mon Sep 17 00:00:00 2001 From: "Kacper Kostka (aider)" Date: Sat, 5 Apr 2025 15:19:53 +0200 Subject: [PATCH] refactor: Reverse noisy transition between sand and stone layers --- js/world.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/world.js b/js/world.js index fd1e886..72ebd4a 100644 --- a/js/world.js +++ b/js/world.js @@ -47,10 +47,10 @@ function getOrCreateChunk(chunkX, chunkY) { const noiseThreshold = y / 10; // 0 at the top, 1 at row 10 if (random() > noiseThreshold) { - chunkData[y * CHUNK_SIZE + x] = STONE; + chunkData[y * CHUNK_SIZE + x] = SAND; } else { - // Randomly choose between sand and empty space - chunkData[y * CHUNK_SIZE + x] = random() < 0.7 ? SAND : EMPTY; + // Randomly choose between stone and empty space + chunkData[y * CHUNK_SIZE + x] = random() < 0.7 ? STONE : EMPTY; } } else { // Below the transition zone, it's all stone