xml.append("<Buildable buildCost=\"" + buildable.getBuildCost() + "\" upkeepCost=\"" + buildable.getUpkeepCost() + "\"/>");
return xml.toString();
}
public Buildable initializeFromNode(Realm realm, Node node) {
Buildable buildable = new Buildable();
int buildCost = Integer.parseInt(node.getAttributes().getNamedItem("buildCost").getNodeValue());
int upkeepCost = Integer.parseInt(node.getAttributes().getNamedItem("upkeepCost").getNodeValue());
buildable.setBuildCost(buildCost);
buildable.setUpkeepCost(upkeepCost);
return buildable;
}