Esempio n. 1
0
  private void spread() throws GameActionException {
    if (!rc.isCoreReady()) {
      return;
    }

    if (adjacentTeammates.length > 3) {
      tryMove(DirectionUtil.getDirectionAwayFrom(adjacentTeammates, currentLocation));
    }
  }
Esempio n. 2
0
  private void microAwayFromZombies() throws GameActionException {
    if (attackableZombies.length == 0
        || !rc.isCoreReady()
        || !RobotUtil.anyCanAttack(attackableZombies)) {
      return;
    }

    tryMove(DirectionUtil.getDirectionAwayFrom(attackableZombies, currentLocation));
  }