public Hatchery(RobotController rc) { this.rc = rc; HQFunctions.InitialLocationBroadcasts(rc); HQFunctions.findInitialRally(rc); }
public void run() { while (true) { try { Robot[] enemies = rc.senseNearbyGameObjects(Robot.class, 35, rc.getTeam().opponent()); if (rc.isActive()) { Movement.fire(rc, enemies, null); HQFunctions.SpawnSoldiers(rc); } if (Clock.getRoundNum() % 50 == 0) { System.out.println(); System.out.println("Enemy Bots: "); int[] AllEnemies = FightMicro.AllEnemyBots(rc); for (int i = 0; i < AllEnemies.length; i++) { System.out.print(FightMicro.getBotLocation(AllEnemies[i])); } System.out.println(); } int broadcast = rc.readBroadcast(rallyPoint2); if (broadcast != 0) { if (broadcast != fightZone) { fightZone = broadcast; roundSet = Clock.getRoundNum(); } // now it is time for us to move on else if (roundSet + 75 < Clock.getRoundNum()) { fightZone = 0; rc.broadcast(rallyPoint2, 0); } } if (Clock.getRoundNum() % 5 == 0 && Clock.getRoundNum() > 100) { // HQFunctions.moveTargetLocationRandomly(rc); /* if (goneForPastr && (rc.sensePastrLocations(rc.getTeam()).length > 0 || roundNum > (Clock.getRoundNum() - 250))) { HQFunctions.setTargetLocation(rc, goneForPastr); } else { goneForPastr = HQFunctions.setTargetLocation(rc, goneForPastr); roundNum = Clock.getRoundNum(); }*/ HQFunctions.setTargetLocation(rc, true); // HQFunctions.findInitialRally(rc); } } catch (Exception e) { } rc.yield(); } }
public Extractor(RobotController rc) { this.rc = rc; towerSpot = HQFunctions.spotOfSensorTower(rc, true); }