public void addStrategicBuildingTarget(final Coords coords) { if (null == coords) { throw new NullPointerException("Coords is null."); } if (!getGame().getBoard().contains(coords)) { log(getClass(), "addStrategicBuildingTarget(Coords)", LogLevel.WARNING, "Board does not contain " + coords.toFriendlyString()); return; } getStrategicBuildingTargets().add(coords); }
@Override public String run(String[] args) { if (args.length == 1) { getClient().getBoard(); return "The legal deployment zone is: " + legalDeploymentZone(); } else if (args.length == 5) { int id = Integer.parseInt(args[1]); Coords coord = new Coords(Integer.parseInt(args[2]) - 1, Integer .parseInt(args[3]) - 1); int nFacing = getDirection(args[4]); getClient().deploy(id, coord, nFacing, 0); return "Unit " + id + " deployed to " + coord.toFriendlyString() + ". (this is assuming it worked. No error checking done.)"; } return "Wrong number of arguments supplied. No deployment done."; }
MovePath movePath, IBoard board, StringBuilder logMsg) { logMsg.append("\n\tHex ").append(hex.getCoords().toFriendlyString());
@Override public String toString() { if (movePath == null) return "There is nothing to move!"; try { return getEntity().toString() + " moved to " + movePath.lastElement().getCoords().toFriendlyString(); } catch (NoSuchElementException nsee) { if (getEntity() != null) { return getEntity().toString() + " probably deployed."; } } catch (NullPointerException npe) { return "There is nothing to move!"; } return "Something happened."; }
edgeCoords = new Coords(boardWidth / 2, 0); msg.append(edgeCoords.toFriendlyString());
getStrategicBuildingTargets().add(coords); sendChat("Building in Hex " + coords.toFriendlyString() + " designated target due to Gun Emplacement.", LogLevel.INFO);
if (null == game.getBoard().getBuildingAt(strategicTarget)) { sendChat("No building to target in Hex " + strategicTarget.toFriendlyString() + ", ignoring.", LogLevel.INFO); } else { false)); sendChat("Building in Hex " + strategicTarget.toFriendlyString() + " designated strategic target.", LogLevel.INFO); fireControlState.getAdditionalTargets().add(bt); sendChat("Building in Hex " + coords.toFriendlyString() + " designated target due to Gun Emplacement.", LogLevel.INFO);
"Center of ally group " + center.toFriendlyString() + " not within board boundaries."); return null;
fireControlState.getAdditionalTargets().add(bt); sendChat("Building in Hex " + coords.toFriendlyString() + " designated target due to" + " infantry inside building.", LogLevel.INFO);
+ ce().toString() + " is now in gear " + gearName(gear) + " heading towards " + cmd.getFinalCoords().toFriendlyString() + " with a final facing of " + getDirection(cmd.getFinalFacing()) + " is now in gear " + gearName(gear) + " heading towards " + cmd.getFinalCoords().toFriendlyString() + ". Total mp used: " + cmd.getMpUsed() + " for a movement of: " + cmd.getHexesMoved();