Examples of BarnAction


Examples of com.jcloisterzone.action.BarnAction

    @Override
    public void prepareActions(List<PlayerAction<?>> actions, Set<FeaturePointer> followerOptions) {
        Position pos = getTile().getPosition();

        if (game.getActivePlayer().hasSpecialMeeple(Barn.class)) {
            BarnAction barnAction = null;
            Location corner = Location.WR.union(Location.NL);
            Location positionChange = Location.W;
            for (int i = 0; i < 4; i++) {
                if (isBarnCorner(corner, positionChange)) {
                    if (barnAction == null) {
                        barnAction = new BarnAction();
                        actions.add(barnAction);
                    }
                    barnAction.add(new FeaturePointer(pos, corner));
                }
                corner = corner.next();
                positionChange = positionChange.next();
            }
        }
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.