From 2f43727ffac452f05fd13951ba1ce74615168591 Mon Sep 17 00:00:00 2001 From: claw Date: Sat, 18 Apr 2026 19:18:19 +0200 Subject: [PATCH] Fix: moveRivers() -> moveLogs() Aufruf --- index.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 9f2e4c7..bea4621 100644 --- a/index.html +++ b/index.html @@ -284,6 +284,15 @@ }); } + // Bäume bewegen + function moveLogs() { + logs.forEach(log => { + log.x += log.speed * log.direction; + if (log.x < -200) log.x = canvas.width; + if (log.x > canvas.width) log.x = -200; + }); + } + // Aligatoren bewegen function moveAlligators() { alligators.forEach(alligator => { @@ -295,15 +304,6 @@ }); } - // Bäume bewegen - function moveLogs() { - logs.forEach(log => { - log.x += log.speed * log.direction; - if (log.x < -200) log.x = canvas.width; - if (log.x > canvas.width) log.x = -200; - }); - } - // Kollisionserkennung function checkCollisions() { // Aligatoren