aboutsummaryrefslogtreecommitdiff
path: root/judge/core.ml
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2014-11-16 12:44:32 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2014-11-16 12:44:32 +0100
commit80475db04ef557abc6d7e1cb708a954d501f4f3a (patch)
tree0fc15d06f0f468c1da1d987131e98cedc9e914f4 /judge/core.ml
parent0e83991e3f8739ec00d744f038fdfaea2b60c98e (diff)
downloadCompetIA-80475db04ef557abc6d7e1cb708a954d501f4f3a.tar.gz
CompetIA-80475db04ef557abc6d7e1cb708a954d501f4f3a.zip
Implement GUI interface for playingHEADmaster
Diffstat (limited to 'judge/core.ml')
-rw-r--r--judge/core.ml9
1 files changed, 3 insertions, 6 deletions
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 [<option> ...] <game_directory>";
- if !game_dir = "" then begin
- Format.eprintf "Error: no game directory specified.@.";
- exit 1
- end;
+ "Usage: judge [<option> ...] [<game_directory>]";
if Filename.is_relative !game_dir then
game_dir := Filename.concat (Unix.getcwd()) !game_dir;
let date =