@Override
public void loadFromSnapshot(Document doc, Element node) {
NodeList nl = node.getElementsByTagName("player");
for (int i = 0; i < nl.getLength(); i++) {
Element playerEl = (Element) nl.item(i);
Player player = game.getPlayer(Integer.parseInt(playerEl.getAttribute("index")));
addTradeResources(player, TradeResource.GRAIN, Integer.parseInt(playerEl.getAttribute("grain")));
addTradeResources(player, TradeResource.WINE, Integer.parseInt(playerEl.getAttribute("wine")));
addTradeResources(player, TradeResource.CLOTH, Integer.parseInt(playerEl.getAttribute("cloth")));
}
}