@Override public Move move(MoveInput input) { System.out.println( "Brethren: " + getMemory().getOwnPopulationRatio() + " cutoff: " + brethrenCutoff + "brethren: " + getMemory().getBrethrenSeen() + " neighbors: " + getMemory().getNeighborsSeen()); if (getMemory().getBiomassRatio() > cutoff) return null; if (getMemory().getOwnPopulationRatio() > brethrenCutoff) return null; if (PlayerUtil.noEmptyNeighboringSpaces(input)) return null; if (!shouldReproduce(input)) return null; Move move = reproduceTowardsFood(input); if (move != null) return move; if (input.noNeighborAt(getPreferredReproduceDirection())) return reproductionMove(getPreferredReproduceDirection()); return randomReproduce(input); }
protected boolean weHaveReproductionEnergyAndArentCrowded(MoveInput input) { return weHaveEnoughEnergyToReproduce(input) && PlayerUtil.atLeastOneEmptyNeighboringSpace(input); }