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