From 80475db04ef557abc6d7e1cb708a954d501f4f3a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 16 Nov 2014 12:44:32 +0100 Subject: Implement GUI interface for playing --- judge/core.ml | 9 +-- judge/guiplay.ml | 155 +++++++++++++++++++++++++++++++++++++++++++ judge/morpion_rec.ml | 18 ++++- judge/morpion_rec_guiplay.ml | 3 + 4 files changed, 178 insertions(+), 7 deletions(-) create mode 100644 judge/guiplay.ml create mode 100644 judge/morpion_rec_guiplay.ml (limited to 'judge') diff --git a/judge/core.ml b/judge/core.ml index e08ce17..cb5df75 100644 --- a/judge/core.ml +++ b/judge/core.ml @@ -36,6 +36,7 @@ module type GAME = sig val s : game -> game_status val display_game : game -> (string * string) -> unit + val gui_act_at : game -> (int * int) -> string end module type CORE = sig @@ -121,7 +122,7 @@ module Core (G: GAME) : CORE = struct let init () = (* 1. PARSE ARGUMENTS *) - let game_dir = ref "" in + let game_dir = ref "." in let args = [ "-p", Arg.Set_int par_games, "How many games to run in parallel (2)"; "-s", Arg.Set_float game_time, @@ -134,11 +135,7 @@ module Core (G: GAME) : CORE = struct ] in Arg.parse args (fun s -> game_dir := s) - "Usage: judge [