From 288d5f5734a680e264840de9b0104b7bf9690c9d Mon Sep 17 00:00:00 2001 From: claw Date: Sat, 18 Apr 2026 18:47:35 +0200 Subject: [PATCH] Fix: Initialisierung korrigiert --- index.html | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index 5fc746e..9f2e4c7 100644 --- a/index.html +++ b/index.html @@ -142,19 +142,12 @@ // Initialisierung function initGame() { - rivers.length = 0; - for (let i = 0; i < numRivers; i++) { - rivers.push({ - y: canvas.height - 150 - (i * 60), - width: 40 + Math.random() * 30, - speed: 1 + Math.random() * 1.5, - direction: i % 2 === 0 ? 1 : -1, - items: [] - }); - + // Logs (Baumstämme im Wasser) + logs.length = 0; for (let i = 0; i < numLogs; i++) { logs.push({ y: canvas.height - 150 - (i * 60), + x: Math.random() * (canvas.width - 100), width: 80 + Math.random() * 60, speed: 1 + Math.random() * 1.5, direction: i % 2 === 0 ? 1 : -1 @@ -172,11 +165,12 @@ }); } + // Aligatoren (Gegner) alligators.length = 0; for (let i = 0; i < numAlligators; i++) { alligators.push({ x: Math.random() * canvas.width, - y: 200 + Math.random() * 200, + y: 150 + Math.random() * 250, width: 60, height: 30, speed: 1.5 + Math.random(),