Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* type wall = (int * int * int * int) *)
- (* type case = (int * *)
- type wall = (int * int * int * int) (* *)
- type case = (int * wall array)
- type tlabyrinthe = (int * int * case array array)
- let create w h c =
- print_endline "Created laby";
- (w, h, c)
- let set_heigh new_h (h, _, _) = let h = new_h in ()
- let set_width new_w (_, w, _) = let w = new_w in ()
- let set_color_from_pos x y new_color (_, _, c) = let (_, k) = c.(x).(y) in c.(x).(y) <- (new_color, k)
- let get_color_from_pos x y (_, _, c) = let (k, _) = c.(x).(y) in k
- let set_open_wall x y wall_pos value (_, _, case) =
- let (color, wall) = case.(x).(y) in
- let matching =
- match wall_pos with
- 1 -> let (_, b, c, d) = wall in case.(x).(y) <- (color, (value, b, c, d))
- | 2 -> let (a, _, c, d) = wall in case.(x).(y) <- (color, (a, value, c, d))
- | 3 -> let (a, b, _, d) = wall in case.(x).(y) <- (color, (a, b, value, d))
- | 4 -> let (a, b, c, _) = wall in case.(x).(y) <- (color, (a, b, c, value))
- in ()
- let left_wall () = 1
- let right_wall () = 2
- let top_wall () = 3
- let bottom_wall () = 4
- let print tLabyrinthe =
- print_endline "Function aff"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement