Added build option to build "stratego" without graphics
[progcomp2012.git] / judge / manager / main.cpp
index 0fbd6ae..9d2cad1 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "game.h"
 
+
 using namespace std;
 
 Piece::Colour SetupGame(int argc, char ** argv);
@@ -82,7 +83,13 @@ Piece::Colour SetupGame(int argc, char ** argv)
                                        ++ii;
                                        break;
                                case 'g':
+                                       #ifdef BUILD_GRAPHICS
                                        graphics = !graphics;
+                                       #else
+                                       fprintf(stderr, "ERROR: -g switch supplied, but the program was not built with graphics.\n Please do not use the -g switch.");
+                                       exit(EXIT_FAILURE);
+                                       #endif //BUILD_GRAPHICS
+
                                        break;
                                case 'p':
                                        printBoard = !printBoard;

UCC git Repository :: git.ucc.asn.au