X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=judge%2Fsimulator%2Fsimulate.py;h=a7a138d2059b3f0c7d74b10fc305e65c4f686b82;hp=e87259ec7324f618e4fd6055b19fd9a52a358e9c;hb=b1c6f5bee1c544be8b04d16d1bce9a66688df0c3;hpb=df9b2d14b2e4e5ea2e99614e44151295bcf4956c;ds=sidebyside diff --git a/judge/simulator/simulate.py b/judge/simulator/simulate.py index e87259e..a7a138d 100755 --- a/judge/simulator/simulate.py +++ b/judge/simulator/simulate.py @@ -152,6 +152,9 @@ if verbose: if verbose: print "Preparing .html results files..." +#BACKUP THE RESULTS DIRECTORY GOD DAMMIT +os.system("mkdir .before_round"+str(totalRounds)+"_BACKUP/; cp " + resultsDirectory+"*" + " .before_round"+str(totalRounds)+"_BACKUP/") + if os.path.exists(resultsDirectory + "index.html") == True: os.remove(resultsDirectory + "index.html") #Delete the file @@ -206,7 +209,7 @@ for agent in agents: agentFile.write(line) line = oldFile.readline() values = line.split(' ') - agent["totalScore"] += int(values[2].strip()) + agent["totalScore"] += float(values[2].strip()) agent["Wins"] += int(values[5].strip()) agent["Losses"] += int(values[8].strip()) agent["Draws"] += int(values[11].strip())