Module PathVisual.Cave


module Cave: sig .. end


Functions to create and modify caves.

type wall_types =
| WALL
| FLOOR
type t = wall_types array array 
val make : int -> int -> t
Make a new cave of dimensions initialized to consist of WALLs
val makeinit : int -> int -> wall_types -> t
Make a new cave initialized to init
val iter : (wall_types -> unit) ->
(unit -> unit) -> t -> unit
Iterate over cave elements.
iter (fun w -> print_string
         (string_of_wall w)) (fun () -> print_newline ()) cave
will print cave
val map : (wall_types -> 'a) -> t -> 'a array array
val copy : t -> t
val set : t -> int -> int -> wall_types -> unit
val fold_right : (wall_types -> 'a -> 'a) ->
('a -> 'a -> 'a) -> t -> 'a -> 'a
val mapi : (int -> int -> wall_types -> 'a) ->
t -> 'a array array
val string_of_wall : wall_types -> string
val string_of_cave : t -> string
val print : t -> unit
val get : t -> int -> int -> wall_types
val is_valid_coor : t -> int -> int -> bool
val wall_neighbours : t -> int -> int -> int
val caveify : t -> int -> t
val neighbour_coords' : int * int -> (int * int) list
val neighbour_coords : int * int -> (int * int) list
val inrangexy : t -> int -> int -> bool
val isfloor : t -> int -> int -> bool
val getvalidxy : t -> int * int
val intpairset_neighbours : t -> PathVisual.IntPairSet.t -> PathVisual.IntPairSet.t
val connected : t -> PathVisual.IntPairSet.t -> PathVisual.IntPairSet.t
val find_unconnected : t -> PathVisual.IntPairSet.t -> int * int
val find_connected : t -> int * int -> PathVisual.IntPairSet.t -> int * int
val dig_tunnel : t -> int * int -> int * int -> t
val connect_cave' : t ->
int * int -> PathVisual.IntPairSet.t -> t
val connect_cave : t -> t
val makecave1 : int -> int -> int -> wall_types array array
val makecave2 : int -> int -> t
val makecave3 : int -> int -> t
val cave0 : wall_types array array
val cave1 : wall_types array array
val cave2 : wall_types array array