distanceToClosestTrap: The function finds the closest trap to a lobster and calculates the distance.
Description
The function finds the closest trap to a lobster and calculates the distance.
Usage
distanceToClosestTrap(Lobster, Trap)
Value
Returns distance to closest trap and saves the trap number in case of multiple traps.
Arguments
- Lobster
location of lobster in the arena
- Trap
location of trap in the arena