コード例 #1
0
  private void spread() throws GameActionException {
    if (!rc.isCoreReady()) {
      return;
    }

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

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