@Override protected void initializeRound() { super.initializeRound(); final ITurnSnapshot snapshot = recordManager.readSnapshot(currentTime); if (snapshot != null) { eventDispatcher.onRoundStarted(new RoundStartedEvent(snapshot, getRoundNum())); } }
@Override protected void initializeRound() { super.initializeRound(); inactiveTurnCount = 0; // Start robots long waitMillis; int waitNanos; if (isDebugging()) { waitMillis = DEBUG_TURN_WAIT_MILLIS; waitNanos = 0; } else { long waitTime = Math.min(300 * cpuConstant, 10000000000L); waitMillis = waitTime / 1000000; waitNanos = (int) (waitTime % 1000000); } for (RobotPeer robotPeer : getRobotsAtRandom()) { robotPeer.startRound(waitMillis, waitNanos); } Logger.logMessage(""); // puts in a new-line in the log message final ITurnSnapshot snapshot = new TurnSnapshot(this, robots, bullets, false); eventDispatcher.onRoundStarted(new RoundStartedEvent(snapshot, getRoundNum())); }