Example #1
0
  protected void stepHarvestingReturn(GameWorld world) {
    Colony home;
    GamePlayer player = world.getPlayer(this);

    if (player == null) {
      return;
    }

    home = world.findThing(player, Colony.class);

    if (home == null) {
      return;
    }

    if (withinRange(home)) {
      player.addMinerals(carryingMinerals);
      carryingMinerals = 0;
      return;
    }

    walkStep(home);
  }