Returns the maximum distance that can be traveled from the given position
along the given heading before leaving the bounds of the world map or
hitting an obstacle.
Returns the maximum distance that can be traveled from the given State's
position along its heading before leaving bounds of the world map or
hitting an obstacle.