git.ucc.asn.au
/
progcomp2012.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added check for rubbish move multipliers
[progcomp2012.git]
/
judge
/
manager
/
main.cpp
diff --git
a/judge/manager/main.cpp
b/judge/manager/main.cpp
index
ce4cd20
..
e65ef0d
100644
(file)
--- 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;
{
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] == '-')
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 (inputFile == NULL)
{
- if (red == NULL || blue == NULL) //Not enough
argument
s
+ if (red == NULL || blue == NULL) //Not enough
player
s
{
fprintf(stderr, "ARGUMENT_ERROR - Did not recieve enough players (did you mean to use the -f switch?)\n");
exit(EXIT_FAILURE);
}
{
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
Game::theGame = new Game(red,blue, graphics, stallTime, allowIllegal,log, reveal,maxTurns, printBoard, timeoutTime);
}
else
UCC
git Repository :: git.ucc.asn.au