aboutsummaryrefslogtreecommitdiff
path: root/judge/dummy_player.ml
diff options
context:
space:
mode:
Diffstat (limited to 'judge/dummy_player.ml')
-rw-r--r--judge/dummy_player.ml14
1 files changed, 13 insertions, 1 deletions
diff --git a/judge/dummy_player.ml b/judge/dummy_player.ml
index fe19b48..09b13aa 100644
--- a/judge/dummy_player.ml
+++ b/judge/dummy_player.ml
@@ -1,5 +1,16 @@
+let words = [|
+ "banane"; "hippopotame"; "povrion";
+ "pourquoi???"; "un ange passe"; "television";
+ "ceci n'est pas..."; "environ 12"; "septante";
+ "Philipp Glass"; "nyaaa"; "tu crois ?"; "hallo";
+ "mange ton muesli"; "va te coucher"; "MAMAAAAN!!";
+ "meme pas peur"; "python FTW"; "savanne!";
+ "le lion mange le lion"; "canard"; "tennis";
+ "sauve qui peut!"; "bref..."; "j'approuve.";
+ |]
+
let expect mgs =
let l = read_line () in
begin try
@@ -24,7 +35,8 @@ let rec turn _ =
"Your turn",
(fun _ ->
if Random.int 2 = 0 then Unix.sleep 1;
- print_string "Play this_is_a_word\n";
+ Format.printf "Play %s@."
+ words.(Random.int (Array.length words));
expect [ "OK", turn ]);
"Play ", turn;
"Tie", finished;