Changeset 9947 for branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/External Evaluator/BattleRunner.java
- Timestamp:
- 09/11/13 15:21:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/External Evaluator/BattleRunner.java
r9926 r9947 27 27 // 28 28 public class BattleRunner { 29 static String[] defaultRobots = new String[] {30 "Evaluation.BestSolution*",31 "sample.Corners",32 "sample.Crazy",33 "sample.Fire",34 "sample.TrackFire",35 "sample.Walls",36 "sample.SpinBot",37 "sample.SittingDuck"38 };39 29 public static String player = "Evaluation.output*"; 40 30 public static List<Double> score = new ArrayList<Double>(); … … 45 35 // The fourth argument is the number of rounds. 46 36 public static void main(String[] args) { 37 if (args.length < 5) 38 System.exit(-1); 39 47 40 String roboCodePath = "C:\\robocode"; 48 41 Boolean visible = false; 49 42 String bots = ""; 50 43 int numberOfRounds = 3; 51 String[] robots = new String[defaultRobots.length]; 52 robots = defaultRobots.clone(); 53 54 if (args.length == 1) 55 { 56 robots[0] = args[0]; 57 player = args[0]; 58 } 59 else if (args.length == 2) 60 { 61 robots[0] = args[0]; 62 player = args[0]; 63 roboCodePath = args[1]; 64 } 65 else if (args.length == 3) 66 { 67 robots[0] = args[0]; 68 player = args[0]; 69 roboCodePath = args[1]; 70 visible = Boolean.valueOf(args[2]); 71 } 72 else if (args.length == 4) 73 { 74 robots[0] = args[0]; 75 player = args[0]; 76 roboCodePath = args[1]; 77 visible = Boolean.valueOf(args[2]); 78 numberOfRounds = Integer.valueOf(args[3]); 79 } 80 else 81 { 82 System.exit(-1); 83 } 44 String[] robots = new String[1 + args.length - 4]; 45 46 player = robots[0] = args[0]; 47 roboCodePath = args[1]; 48 visible = Boolean.valueOf(args[2]); 49 numberOfRounds = Integer.valueOf(args[3]); 50 for (int i = 4; i < args.length; i++) 51 robots[i - 3] = args[i]; 84 52 85 53 RobocodeEngine.setLogMessagesEnabled(false);
Note: See TracChangeset
for help on using the changeset viewer.