Commit d9301991 authored by erwan's avatar erwan
Browse files

Update: Add a Seed.reset function

parent 698a46ae
(* Time-stamp: <modified the 20/05/2021 (at 09:23) by Erwan Jahier> *)
(* Time-stamp: <modified the 21/05/2021 (at 17:18) by Erwan Jahier> *)
let seed = ref None
let replay_seed = ref false
......@@ -11,7 +11,7 @@ let set s =
seed := Some s
let seed_file_name label =
Printf.sprintf "sasa-%s.seed" label
Printf.sprintf "sasa-%s.seed" label
(* for --replay *)
let reset_the_seed_to_last label =
......@@ -28,6 +28,8 @@ let reset_the_seed_to_last label =
flush stderr;
false
let reset () = seed := None
let rec (get : string -> int) =
fun label ->
match !seed with
......
(* Time-stamp: <modified the 20/05/2021 (at 09:25) by Erwan Jahier> *)
(* Time-stamp: <modified the 21/05/2021 (at 11:29) by Erwan Jahier> *)
val set : int -> unit
val reset : unit -> unit
(** The string is used to create a file name to save/restore the seed
when the --replay option is used *)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment