Package org.freerealm.tile.improvement

Examples of org.freerealm.tile.improvement.TileImprovementType


    private int getResourceModifier(Resource resource) {
        int resourceModifier = 0;
        boolean tileHasResource = (getType().getProduction(resource) > 0);
        Iterator<TileImprovementType> improvementsIterator = getImprovementsIterator();
        while (improvementsIterator.hasNext()) {
            TileImprovementType improvement = improvementsIterator.next();
            resourceModifier = resourceModifier + improvement.getResourceModifier(resource, tileHasResource);
        }
        if (getVegetation() != null) {
            resourceModifier = resourceModifier + getVegetation().getResourceModifier(resource, tileHasResource);
        }
        if (getBonusResource() != null) {
View Full Code Here


    private float getImprovementMovementCost() {
        float improvementMovementCost = Float.MAX_VALUE;
        Iterator<TileImprovementType> improvemenIterator = getImprovementsIterator();
        while (improvemenIterator.hasNext()) {
            TileImprovementType improvement = improvemenIterator.next();
            if (improvement.getMovementCost() != 0 && improvement.getMovementCost() < improvementMovementCost) {
                improvementMovementCost = improvement.getMovementCost();
            }
        }
        return improvementMovementCost;
    }
View Full Code Here

TOP

Related Classes of org.freerealm.tile.improvement.TileImprovementType

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.