Add script to calculate the closest stone