Trying to fix bug with fifo and network players
[progcomp2013.git] / qchess / qchess.cgi
index 4b8e34c..035dce0 100755 (executable)
@@ -157,13 +157,17 @@ def main(argv):
                elif request == "start":
                        print "New game."
                        args = path+"qchess.py --no-graphics"
-                       if mode == None or mode == "bishop":
-                               args += " @fifo:../qchess-cgi-data/"+client+" @internal:AgentBishop --log=../qchess-cgi-data/"+client+".log"
-                       if mode == "random":
+                       if mode == "black":
+                               args += " @internal:AgentBishop @fifo:../qchess-cgi-data/"+client
+                       elif mode == None or mode == "bishop":
+                               args += " @fifo:../qchess-cgi-data/"+client+" @internal:AgentBishop"
+                       elif mode == "random":
                                args += " @fifo:../qchess-cgi-data/"+client+" @internal:AgentRandom"
                        elif mode == "eigengame":
                                args += " --server=progcomp.ucc.asn.au @fifo:../qchess-cgi-data/"+client
 
+                       args += " --log=@../qchess-cgi-data/"+client+".log";
+
                        os.system("echo '"+args+"' | at now")
 
                #       subprocess.Popen(args)

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