X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=judge%2Fmanager%2Fmain.cpp;h=e65ef0d1b6a142781f821fc076a2d42b21b0d29d;hp=ce4cd202233000103f10999adfb4e230688d2a35;hb=341297b4dce9528d54fe9dceeff0d6dc33f70abe;hpb=e1153eebe8cfd0c881cef2ff8fca63f130e736b3 diff --git a/judge/manager/main.cpp b/judge/manager/main.cpp index ce4cd20..e65ef0d 100644 --- a/judge/manager/main.cpp +++ b/judge/manager/main.cpp @@ -64,6 +64,7 @@ Piece::Colour SetupGame(int argc, char ** argv) { char * red = NULL; char * blue = NULL; double stallTime = 0.0; bool graphics = false; bool allowIllegal = false; FILE * log = NULL; Piece::Colour reveal = Piece::BOTH; char * inputFile = NULL; int maxTurns = 5000; bool printBoard = false; double timeoutTime = 2.0; + for (int ii=1; ii < argc; ++ii) { if (argv[ii][0] == '-') @@ -211,11 +212,12 @@ Piece::Colour SetupGame(int argc, char ** argv) if (inputFile == NULL) { - if (red == NULL || blue == NULL) //Not enough arguments + if (red == NULL || blue == NULL) //Not enough players { fprintf(stderr, "ARGUMENT_ERROR - Did not recieve enough players (did you mean to use the -f switch?)\n"); exit(EXIT_FAILURE); } + Game::theGame = new Game(red,blue, graphics, stallTime, allowIllegal,log, reveal,maxTurns, printBoard, timeoutTime); } else