+
+ agent["totalScore"] += agent["score"][0]
+ agent["Wins"] += len(agent["VICTORY"]) + len(agent["DEFAULT"])
+ agent["Losses"] += len(agent["DEFEAT"]) + len(agent["SURRENDER"])
+ agent["Draws"] += len(agent["DRAW"]) + len(agent["DRAW_DEFAULT"])
+ agent["Illegal"] += len(agent["ILLEGAL"]) + len(agent["BOTH_ILLEGAL"]) + len(agent["BAD_SETUP"])
+ agent["Errors"] += len(agent["INTERNAL_ERROR"])
+
+ agentFile.write("<h3> Accumulated Results </h3>\n")
+ agentFile.write("<table border=\"0\" cellpadding=\"10\">\n")
+ agentFile.write("<tr> <th> Score </th> <th> Wins </th> <th> Losses </th> <th> Draws </th> <th> Illegal </th> <th> Errors </th></tr>\n")
+ agentFile.write("<tr> <td> "+str(agent["totalScore"])+" </td> <td> "+str(agent["Wins"])+" </td> <td> "+str(agent["Losses"])+" </td> <td> "+str(agent["Draws"])+" </td> <td> "+str(agent["Illegal"])+" </td> <td> " +str(agent["Errors"])+" </td> </tr>\n")
+
+ agentFile.write("</table>\n")