Changeset 9899 for branches/Robocode.TrunkInt
- Timestamp:
- 08/22/13 16:13:05 (11 years ago)
- Location:
- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/External Evaluator/BattleRunner.java
r9891 r9899 125 125 else 126 126 opponentScore = result.getScore(); 127 } 128 BattleRunner.score.add(robotScore / (robotScore + opponentScore)); 127 } 128 129 //prevent div / 0 which can happen if both robots do not score 130 if((robotScore + opponentScore) == 0) { 131 BattleRunner.score.add(0.0); 132 } else { 133 BattleRunner.score.add(robotScore / (robotScore + opponentScore)); 134 } 129 135 } 130 136 }
Note: See TracChangeset
for help on using the changeset viewer.