tom - sheepRect.top;
            }
          }
        }
      }
      //Wolf movement
      function moveWolves() {
        wolves.forEach((wolf) => {
          // Simple wolf movement: chase the nearest sheep
          let closestSheep = null;
          let closestDistance = Infinity;

          for (const sheep of sheep) {
            const distance = getDistance(wolf.x, wolf.y, sheep.x, sheep.y);
            if (distance < closestDistance) {
              closestDistance = distance;
              closes