From 3f4f8bc09c24cbd289d8e7a8f76559e7386abf22 Mon Sep 17 00:00:00 2001 From: "Kacper Kostka (aider)" Date: Fri, 4 Apr 2025 12:00:26 +0200 Subject: [PATCH] fix: Resolve duplicate identifier by renaming `chunkY` to `floorChunkY` --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 1970ac2..adf73cd 100644 --- a/script.js +++ b/script.js @@ -340,8 +340,8 @@ function setPixel(worldX, worldY, type) { function getPixel(worldX, worldY) { // Special case: floor at the bottom of the world (first two chunks) - const chunkY = Math.floor(worldY / CHUNK_SIZE); - if (worldY % CHUNK_SIZE === CHUNK_SIZE - 1 && (chunkY === 0 || chunkY === 1)) { + const floorChunkY = Math.floor(worldY / CHUNK_SIZE); + if (worldY % CHUNK_SIZE === CHUNK_SIZE - 1 && (floorChunkY === 0 || floorChunkY === 1)) { return WALL; }