let inrangexy (cave : t) x y = x >= 0 && y >= 0 && x < Array.length cave && y < Array.length cave.(0)