Package com.jcloisterzone.feature

Examples of com.jcloisterzone.feature.Farm.walk()


        }
        Farm farm = (Farm) feature;

        FarmScoreContext ctx = farm.getScoreContext();
        ctx.setCityCache(new HashMap<City, CityScoreContext>());
        farm.walk(ctx);

        if (!farm.getTile().getGame().hasRule(CustomRule.MULTI_BARN_ALLOWED)) {
            for (Special m : ctx.getSpecialMeeples()) {
                if (m instanceof Barn) {
                    return new DeploymentCheckResult("Another barn is already placed on the farm.");
View Full Code Here


            pos = pos.add(positionChange);
            positionChange = positionChange.next();
        }

        if (!game.hasRule(CustomRule.MULTI_BARN_ALLOWED)) {
            return !farm.walk(new IsOccupied().with(Barn.class));
        }

        return true;
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.