From 43f6aa6e9b6dfe4faebbd1bfcf2098fb8f32a1da Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sun, 19 Jun 2011 13:45:28 +0200 Subject: Add exception filtering in left and right apply --- ltg.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'ltg.ml') diff --git a/ltg.ml b/ltg.ml index 1da6295..1b7c329 100644 --- a/ltg.ml +++ b/ltg.ml @@ -20,7 +20,14 @@ let read_move () = Scanf.scanf "%d\n" (fun d -> match d with | _ -> failwith "Wrong move number" ) -let play_move () = () +(* important print newline to flush output *) +let play_move () = + Printf.printf "1"; + print_newline (); + Printf.printf "I"; + print_newline(); + Printf.printf "1"; + print_newline () let automatic player = let aux i slot = @@ -44,8 +51,6 @@ let do_round = let _ = let round = ref 1 in while !round <= 100000 do - Printf.printf "Round %d\n========" !round; - print_newline (); do_round (); incr round done \ No newline at end of file -- cgit v1.2.3-70-g09d2