Skip to content

Commit adbe583

Browse files
authored
Merge pull request #29 from Butanium/main
Added action converstion to string for SEED (ocaml starter)
2 parents 91f69eb + 63c83c5 commit adbe583

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

starterAIs/starter.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ and toString = function (* a good exemple on how you can
2929
match actions *)
3030
| GROW t -> Printf.sprintf "GROW %d" t
3131
| COMPLETE t -> Printf.sprintf "COMPLETE %d" t
32-
| WAIT -> "WAIT" in
32+
| WAIT -> "WAIT"
33+
| SEED (a,b) -> Printf.sprintf "SEED %d %d" a b
34+
in
3335

3436
let numberofcells = int_of_string (input_line stdin) in (* 37 *)
3537

@@ -95,4 +97,4 @@ while true do
9597
(* how to print an action *)
9698
| x :: xs -> print_endline @@ toString x
9799
| [] -> failwith "No action found (impossible in theory)"
98-
done;;
100+
done;;

0 commit comments

Comments
 (0)