Closest enemy in a direction (left, right, forward, back)

I super like this sort of solution…
It’s so talented to figure out something like this