Package com.jcloisterzone.feature

Examples of com.jcloisterzone.feature.City


    }

    public City getCityWithPrincess() {
        for (Feature p : features) {
            if (p instanceof City ) {
                City cp = (City) p;
                if (cp.isPricenss()) {
                    return cp;
                }
            }
        }
        return null;
View Full Code Here


        }
    }

    @Override
    public void prepareActions(List<PlayerAction<?>> actions, Set<FeaturePointer> followerOptions) {
        City c = getTile().getCityWithPrincess();
        if (c == null || ! c.walk(new IsOccupied().with(Follower.class))) return;
        Feature cityRepresentative = c.getMaster();

        PrincessAction princessAction = null;
        for (Meeple m : game.getDeployedMeeples()) {
            if (!(m.getFeature() instanceof City)) continue;
            if (m.getFeature().getMaster().equals(cityRepresentative) && m instanceof Follower) {
View Full Code Here

    }

    @Override
    public void initFeature(Tile tile, Feature feature, Element xml) {
        if (feature instanceof City && attributeBoolValue(xml, "besieged")) {
            City city = (City) feature;
            city.setBesieged(true);
            tile.setTrigger(TileTrigger.BESIEGED);
        }
    }
View Full Code Here

        game.initFeature(tile, road, e);
    }

    private void processCityElement(Element e) {
        String[] sides = asLocation(e);
        City c = new City();
        c.setId(game.idSequnceNextVal());
        c.setPennants(attributeIntValue(e, "pennant", 0));
        initFromDirList(c, sides);
        game.initFeature(tile, c, e);
    }
View Full Code Here

TOP

Related Classes of com.jcloisterzone.feature.City

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.