X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=judge%2Fsimulator%2Fsimulate.py;h=217a80eda54fc1cf96cd6ceec565563076206a48;hp=b44012b0397952591f017c6bba41cae8f9c1df3f;hb=5f9adddd695f2664a0d690b59a779e40b51ade3d;hpb=e1153eebe8cfd0c881cef2ff8fca63f130e736b3 diff --git a/judge/simulator/simulate.py b/judge/simulator/simulate.py index b44012b..217a80e 100755 --- a/judge/simulator/simulate.py +++ b/judge/simulator/simulate.py @@ -10,6 +10,7 @@ Now (sortof) generates .html files to display results in a prettiful manner. + THIS FILE IS TERRIBLE author Sam Moore (matches) [SZM] website http://matches.ucc.asn.au/stratego @@ -127,7 +128,7 @@ for name in agentNames: break infoFile.close() - if os.path.exists(agentExecutable) == False: + if os.path.exists(agentExecutable.split(" ")[0]) == False: if verbose: sys.stdout.write(" Invalid! (Path: \""+agentExecutable+"\" does not exist!)\n") continue @@ -152,6 +153,26 @@ if verbose: print "Preparing .html results files..." +if os.path.exists(resultsDirectory + "index.html") == True: + os.remove(resultsDirectory + "index.html") #Delete the file +totalFile = open(resultsDirectory + "index.html", "w") +totalFile.write("\n
\nPlease wait for the rounds to finish. You can view the current progress by watching the Log Files
") +if totalRounds > 1: + totalFile.write("Round " + str(i) + " |