Package org.freerealm.diplomacy

Examples of org.freerealm.diplomacy.PlayerRelation


    public String getInnerXML(Diplomacy diplomacy) {
        StringBuffer xml = new StringBuffer();
        xml.append("<relations>\n");
        Iterator<PlayerRelation> iterator = diplomacy.getPlayerRelationsIterator();
        while (iterator.hasNext()) {
            PlayerRelation playerRelation = iterator.next();
            xml.append("<relation>\n");
            xml.append("<player1>" + playerRelation.getPlayer1().getId() + "</player1>");
            xml.append("<player2>" + playerRelation.getPlayer2().getId() + "</player2>");
            xml.append("<status>" + diplomacy.getPlayerRelationStatus(playerRelation) + "</status>");
            xml.append("</relation>\n");
        }
        xml.append("</relations>\n");
        return xml.toString();
View Full Code Here

TOP

Related Classes of org.freerealm.diplomacy.PlayerRelation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.