#Makefile for Stratego
#Use this to build with graphics
-#CPP = g++ -Wall -pedantic -lSDL -lGL -lpthread -g
+#LIBRARIES = -lSDL -lGL -lpthread
#Use this to build without graphics
-CPP = g++ -Wall -pedantic -lpthread -g
+LIBRARIES = -lpthread
+CPP = g++ -Wall -pedantic -g
OBJ = main.o controller.o ai_controller.o human_controller.o program.o thread_util.o stratego.o graphics.o game.o
BIN = stratego
$(BIN) : $(OBJ)
- $(CPP) -o $(BIN) $(OBJ)
+ $(CPP) -o $(BIN) $(OBJ) $(LIBRARIES)
To enable graphics:
1. Ensure that the first line of the source file "graphics.h" reads:
#define BUILD_GRAPHICS
- 2. In "Makefile", uncomment the line "CPP = g++ -Wall -pedantic -lSDL -lGL -g" and comment out the line "CPP = g++ -Wall -pedantic -g"
+ 2. In "Makefile", uncomment the line "LIBRARIES = -lSDL -lGL -lpthread"
+ and comment out the line "LIBRARIES = -lpthread"
To disable graphics:
1. Comment out the first line of "graphics.h" i.e ensure that it reads:
//#define BUILD_GRAPHICS
- 2. In "Makefile", uncomment the line "CPP = g++ -Wall -pedantic -g" and comment out the line "CPP = g++ -Wall -pedantic -lSDL -lGL -g"
+ 2. In "Makefile", uncomment the line "LIBRARIES = -lpthread"
+ and comment out the line "LIBRARIES = -lSDL -lGL -lpthread"
If you intend to build with graphics enabled, you will need the SDL and OpenGL developement libraries installed first.
If you intend to use graphics, please ensure the "images" directory is located in the executable's run directory.
<p><b> Q: I don't know how to program, but am interested in the competition, what should I do? </b> </p>
<p> A: You will have to learn how to program; the best way to do this is by a combination of the internet and trial and error. Look at the sample AI programs for a reference. </p>
</li>
+ <li>
+ <p> <b> Q: Is windows supported? </b> </p>
+ <p> A: One day, when I am feeling particularly cheerful and need depressing, I will attempt to get things to work on windows. </p>
+
+ <p>(tl;dr NO) </p>
+ </li>
</ol>
<p> Human players are also supported, although the interface is minimal, as this feature is meant for testing. </p>
<p> If you just want to play a game, without having to write your own AI, try <a href="http://www.probe.imersatz.com/"/>Probe</a> </p>
+<h4> Windows Support </h4>
+<p> Windows is not supported at this stage. </p>
+<p> Why? Because windows doesn't have fork, or pthread, which I used to write the program because they work on linux, and I use debian. </p>
+
+<h4> Bug reports </h4>
+<p> Please report bugs to matches@ with a detailed description, and if possible, the output of gdb, valgrind, or both :) </p>
+<h5> Known Bugs </h5>
+<ol>
+ <li> Ash reported a segfault upon every program start, running under Ubuntu. I can't replicate this bug, and don't have any other information. </li>
+</ol>
+
<h4> Screenshot </h4>
<img border="0" src="screenshot.png" alt="Graphical output of 'stratego' manager program." title="Graphical output of 'stratego' manager program. Options '-g' for graphics and '-b' to hide Blue pieces that have not taken part in combat yet. Red and Blue are both linked to the 'asmodeus' AI. Taken with scrot on 7/12/11." width="327" height="344" />