let caveify cave n : t = mapi (fun x y w -> if wall_neighbours cave x y >= n then WALL else FLOOR) cave