git.ucc.asn.au
/
progcomp2012.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Backing up the results files before fucking with them
[progcomp2012.git]
/
judge
/
simulator
/
simulate.py
diff --git
a/judge/simulator/simulate.py
b/judge/simulator/simulate.py
index
e87259e
..
a7a138d
100755
(executable)
--- a/
judge/simulator/simulate.py
+++ b/
judge/simulator/simulate.py
@@
-152,6
+152,9
@@
if verbose:
if verbose:
print "Preparing .html results files..."
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
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(' ')
agentFile.write(line)
line = oldFile.readline()
values = line.split(' ')
- agent["totalScore"] +=
in
t(values[2].strip())
+ agent["totalScore"] +=
floa
t(values[2].strip())
agent["Wins"] += int(values[5].strip())
agent["Losses"] += int(values[8].strip())
agent["Draws"] += int(values[11].strip())
agent["Wins"] += int(values[5].strip())
agent["Losses"] += int(values[8].strip())
agent["Draws"] += int(values[11].strip())
UCC
git Repository :: git.ucc.asn.au