let set_cursor_ifvalid s (x,y) =
       if Cave.isfloor s.cave x y
       then s.cursor <- (x,y)