Module Crush

type level = {
  1. name : string;
  2. hint : string;
  3. slices : string list list;
}
val levels : level array
val nx : level -> int
val ny : level -> int
val nz : level -> int
val cell : level -> int -> int -> int -> char
val across : level -> int -> int
val deep_n : level -> int -> int
val at : int -> int -> int -> int * int
val project : level -> int -> int -> int -> char
val plane : level -> int -> bool -> int -> Tilemap.t
type play = {
  1. level : int;
  2. view : int;
  3. crushed : bool;
  4. squash : Playground.number;
  5. u : Playground.number;
  6. y : Playground.number;
  7. depth : int;
  8. vx : Playground.number;
  9. vy : Playground.number;
  10. ground : bool;
  11. message : string;
}
val enter : int -> play
val current : play -> Tilemap.t
val crush : play -> play
val uncrush : play -> play
val turn : play -> play
type input = {
  1. dx : Playground.number;
  2. jump : bool;
  3. step_deep : int;
  4. crush_key : bool;
  5. turn_key : bool;
}
val nothing : input
val read_input : ((Playground.keyboard -> bool) -> bool) -> Playground.keyboard -> input
val step : input -> play -> play
val fell : play -> bool
val at_exit : play -> bool
type outcome =
  1. | Going of play
  2. | Next_level of play
  3. | Finished
val frame : input -> play -> outcome