public String toString() { String ownerString; String strengthString = ""; String eccmString = ""; if (owner != null) { ownerString = owner.getName(); } else { ownerString = "none"; } if (angelStrength != 0) { strengthString = ", aS: " + angelStrength; } else if (strength != 0){ if (isECMNova) { strengthString = ", nS: " + strength; } else { strengthString = ", s: " + strength; } } if (angelECCMStrength != 0) { eccmString = ", cAS: " + angelECCMStrength; } else if (eccmStrength != 0){ eccmString = ", cS: " + eccmStrength; } return "(" + pos.toString() + ", " + ownerString + ", r:" + range + strengthString + eccmString + ")"; }
@Override public String toString() { return "Facing " + getFacing() + "; " + (getCoords() == null ? "null" : getCoords().toString()); } }
public void collapseBasement(Coords coords, IBoard board, Vector<Report> vPhaseReport) { if ((basement.get(coords) == BasementType.NONE) || (basement.get(coords) == BasementType.ONE_DEEP_NORMALINFONLY)) { System.err.println("hex has no basement to collapse"); return; } if (basementCollapsed.get(coords)) { System.err.println("hex has basement that already collapsed"); return; } Report r = new Report(2112, Report.PUBLIC); r.add(getName()); r.add(coords.getBoardNum()); vPhaseReport.add(r); System.err.println("basement " + basement + "is collapsing, hex:" + coords.toString() + " set terrain!"); board.getHex(coords).addTerrain(Terrains.getTerrainFactory().createTerrain( Terrains.BLDG_BASE_COLLAPSED, 1)); basementCollapsed.put(coords, true); }
excep.printStackTrace(); } else { errBuff.append("Unable to create building at " + coords.toString() + "!\n"); errBuff.append(excep.getMessage() + "\n"); excep.printStackTrace(); } else { errBuff.append("Unable to create fuel tank at " + coords.toString() + "!\n"); errBuff.append(excep.getMessage() + "\n"); excep.printStackTrace(); } else { errBuff.append("Unable to create bridge at " + coords.toString() + "!\n"); errBuff.append(excep.getMessage() + "\n");