26 lines
582 B
OCaml
26 lines
582 B
OCaml
open Graphics ;;
|
|
Random.self_init () ;;
|
|
|
|
let mainloop () =
|
|
open_graph Csts.open_string ;
|
|
set_window_title "Maeth";
|
|
try
|
|
while true do
|
|
auto_synchronize false ;
|
|
clear_graph () ;
|
|
Menus.print_current_interface () ;
|
|
auto_synchronize true ;
|
|
Menus.action_on_interface () ;
|
|
Unix.sleepf Csts.sleep_d
|
|
done ;
|
|
()
|
|
with
|
|
| Menus.MenuStart ->
|
|
clear_graph () ;
|
|
Maeth.print_calc (Maeth.generate_random_calc 8 1 20) (10) (Csts.__height__/2) 20 ;
|
|
while true do
|
|
Unix.sleepf Csts.sleep_d
|
|
done ;;
|
|
|
|
|
|
mainloop () ;; |