From 80e625a9c8d33c71fe69a375c211868fcc1938a5 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Mon, 10 Nov 2014 10:46:37 +0100 Subject: Start work on players! --- morpion_rec/FeirisuNyanNyan/_tags | 2 ++ morpion_rec/FeirisuNyanNyan/feirisu.ml | 17 +++++++++++++++++ morpion_rec/FeirisuNyanNyan/lib | 1 + 3 files changed, 20 insertions(+) create mode 100644 morpion_rec/FeirisuNyanNyan/_tags create mode 100644 morpion_rec/FeirisuNyanNyan/feirisu.ml create mode 120000 morpion_rec/FeirisuNyanNyan/lib (limited to 'morpion_rec/FeirisuNyanNyan') diff --git a/morpion_rec/FeirisuNyanNyan/_tags b/morpion_rec/FeirisuNyanNyan/_tags new file mode 100644 index 0000000..c653205 --- /dev/null +++ b/morpion_rec/FeirisuNyanNyan/_tags @@ -0,0 +1,2 @@ +"lib": include +true: use_unix, use_graphics diff --git a/morpion_rec/FeirisuNyanNyan/feirisu.ml b/morpion_rec/FeirisuNyanNyan/feirisu.ml new file mode 100644 index 0000000..be6cc63 --- /dev/null +++ b/morpion_rec/FeirisuNyanNyan/feirisu.ml @@ -0,0 +1,17 @@ + +module Mayushii : Player.IA = struct + + module G = Morpion_rec.G + + let play g = + let cc = G.possibilities g in + List.nth cc + (Random.int (List.length cc)) + +end + +module P = Player.P(Mayushii) + +let () = + Random.self_init(); + P.run() diff --git a/morpion_rec/FeirisuNyanNyan/lib b/morpion_rec/FeirisuNyanNyan/lib new file mode 120000 index 0000000..e834a2a --- /dev/null +++ b/morpion_rec/FeirisuNyanNyan/lib @@ -0,0 +1 @@ +../../judge \ No newline at end of file -- cgit v1.2.3