A Monte Carlo approach to the computation of refraction of water waves