Package org.freerealm.tile

Examples of org.freerealm.tile.TileBuildablePrerequisite


        }
        xml.append("</tileTypes>\n");
        xml.append("<prerequisites>\n");
        Iterator<TileBuildablePrerequisite> iterator = tileImprovementType.getPrerequisitesIterator();
        while (iterator.hasNext()) {
            TileBuildablePrerequisite tileBuildablePrerequisite = iterator.next();
            if (tileBuildablePrerequisite instanceof NoVegetationPrerequisite) {
                xml.append("<NoVegetation/>\n");
            } else if (tileBuildablePrerequisite instanceof NoTileImprovementPrerequisite) {
                NoTileImprovementPrerequisite noTileImprovementPrerequisite = (NoTileImprovementPrerequisite) tileBuildablePrerequisite;
                xml.append("<NoTileImprovement>\n");
View Full Code Here


        if (!tileImprovement.canBeBuiltOnTileType(tile.getType())) {
            return false;
        }
        Iterator<TileBuildablePrerequisite> tileBuildablePrerequisiteIterator = tileImprovement.getPrerequisitesIterator();
        while (tileBuildablePrerequisiteIterator.hasNext()) {
            TileBuildablePrerequisite tileBuildablePrerequisite = tileBuildablePrerequisiteIterator.next();
            tileBuildablePrerequisite.setTile(tile);
            if (!tileBuildablePrerequisite.isSatisfied()) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

TOP

Related Classes of org.freerealm.tile.TileBuildablePrerequisite

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.