Package com.jcloisterzone.action

Examples of com.jcloisterzone.action.MeepleAction


    public void enter() {
        List<PlayerAction<?>> actions = new ArrayList<>();

        Set<FeaturePointer> followerLocations = game.prepareFollowerLocations();
        if (getActivePlayer().hasFollower(SmallFollower.class&& !followerLocations.isEmpty()) {
            actions.add(new MeepleAction(SmallFollower.class).addAll(followerLocations));
        }
        game.prepareActions(actions, ImmutableSet.copyOf(followerLocations));
        if (isAutoTurnEnd(actions)) {
            next();
        } else {
View Full Code Here


    @Override
    public void prepareActions(List<PlayerAction<?>> actions, Set<FeaturePointer> followerOptions) {
        if (game.getActivePlayer().hasFollower(Wagon.class) && !followerOptions.isEmpty()) {
            Set<FeaturePointer> wagonLocations = filterWagonLocations(followerOptions);
            if (!wagonLocations.isEmpty()) {
                actions.add(new MeepleAction(Wagon.class).addAll(wagonLocations));
            }
        }
    }
View Full Code Here

        //TODO what about pay ransom for phantom now?
        if (!getActivePlayer().hasFollower(Phantom.class) || (princessCap != null && princessCap.isPrincessUsed())) {
            next();
            return;
        }
        MeepleAction phantomAction = new MeepleAction(Phantom.class);
        List actions = Collections.singletonList(phantomAction);
        Set<FeaturePointer> followerLocations = game.prepareFollowerLocations();
        phantomAction.addAll(followerLocations);

        if (towerCap != null) {
            towerCap.prepareTowerFollowerDeploy(actions);
        }
        if (flierCap != null) {
            flierCap.prepareFlier(actions, false);
        }

        if (phantomAction.isEmpty()) {
            next();
        } else {
            game.post(new SelectActionEvent(getActivePlayer(), actions, true));
        }
    }
View Full Code Here

    }

    @Override
    public void prepareActions(List<PlayerAction<?>> actions, Set<FeaturePointer> followerOptions) {
        if (game.getActivePlayer().hasFollower(BigFollower.class) && !followerOptions.isEmpty()) {
            actions.add(new MeepleAction(BigFollower.class).addAll(followerOptions));
        }
    }
View Full Code Here

TOP

Related Classes of com.jcloisterzone.action.MeepleAction

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.