"""Backwards-compat shim — flocking logic now lives in ``herding.world.flocking_sim``.

Kept so any external reference still resolves.
"""

import os
import sys

_HERE = os.path.dirname(os.path.abspath(__file__))
_PROJECT_ROOT = os.path.normpath(os.path.join(_HERE, "..", ".."))
if _PROJECT_ROOT not in sys.path:
    sys.path.insert(0, _PROJECT_ROOT)

from herding.world.flocking_sim import (  # noqa: F401
    MAX_SPEED, FLEE_SPEED, WANDER_SPEED,
    WALL_MARGIN, WALL_HARD_MARGIN, WALL_HARD_GAIN,
    FLEE_DIST, SEPARATION_DIST, COHESION_DIST,
    PEN_MARGIN,
    compute_heading_speed,
)
from herding.world.geometry import (  # noqa: F401
    FIELD_X, FIELD_Y, PEN_X, PEN_Y,
    in_pen,
)

# Original module-level names retained for any code still importing them.
X_MIN, X_MAX = FIELD_X
Y_MIN, Y_MAX = FIELD_Y
PEN_X_MIN, PEN_X_MAX = PEN_X
PEN_Y_MIN, PEN_Y_MAX = PEN_Y
