Add a break into the while loop

Sometimes none ambulance could pick up any patient but when route
another ambulance, it restores the states. That leads to infinite loop