diff --git a/a.out b/a.out index eef7944..73eb009 100755 Binary files a/a.out and b/a.out differ diff --git a/trees.cmi b/trees.cmi index d0adebc..3136f97 100644 Binary files a/trees.cmi and b/trees.cmi differ diff --git a/trees.cmo b/trees.cmo index 0564047..4f2ce08 100644 Binary files a/trees.cmo and b/trees.cmo differ diff --git a/trees.ml b/trees.ml index c9cd94b..463184a 100644 --- a/trees.ml +++ b/trees.ml @@ -112,17 +112,18 @@ let even_more_pretty_printing t r ystep skip = connect graphdata.(dpth-1); done; - set_line_width 5 ; + set_line_width (max 1 (r/6)) ; for dpth = 0 to (Array.length graphdata -1) do draw_list graphdata.(dpth) dpth r done; + (* let halt = ref false in while !halt = false do Unix.sleepf 0.1 ; Unix.sleepf 2.0 ; halt := true; - done; + done;*) end; graphdata ;; @@ -360,16 +361,16 @@ let successive_insert () = Stdlib.print_endline "What element would you like to insert ? (crash to terminate)"; let elt = Scanf.bscanf Scanf.Scanning.stdin "%d\n" identity in - close_graph () ; open_graph " 1200x1000" ; set_window_title "Trees" ; cur_tree := insert_abr !cur_tree elt; - ignore (pretty_tree_printing_new_version !cur_tree 40 100 1200 1000 true) + (*ignore (pretty_tree_printing_new_version !cur_tree 40 100 1200 1000 true)*) + ignore (even_more_pretty_printing !cur_tree 20 100 false); done; () with - | Stdlib.Scanf.Scan_failure _ -> ignore (pretty_tree_printing_new_version !cur_tree 40 150 1200 1000 true) ;close_graph () ;; + | Stdlib.Scanf.Scan_failure _ -> ignore (even_more_pretty_printing !cur_tree 20 100 false) ;close_graph () ;; (* --------------------------------------| TESTS |-------------------------------------- *) Random.self_init () ;;