Examples of UndeployAction


Examples of com.jcloisterzone.action.UndeployAction

        }
        return actions;
    }

    private List<PlayerAction<?>> prepareRemovalAction(Class<? extends Feature> cornType) {
      UndeployAction action = null;
        for (Meeple m : game.getDeployedMeeples()) {
            if (!(m instanceof Follower)) continue;
            if (m.getPlayer() != getActivePlayer()) continue;
            if (!cornType.isInstance(m.getFeature())) continue;
            if (action == null) {
                action = new UndeployAction("undeploy");
            }
            action.add(new MeeplePointer(m));
        }
        if (action == null) return Collections.emptyList();
        return Collections.<PlayerAction<?>>singletonList(action);
    }
View Full Code Here

Examples of com.jcloisterzone.action.UndeployAction

    @Override
    public void prepareActions(List<PlayerAction<?>> actions, Set<FeaturePointer> followerOptions) {
        if (!getTile().hasTrigger(TileTrigger.FESTIVAL)) return;

        Player activePlayer = game.getActivePlayer();
        UndeployAction action = new UndeployAction(UNDEPLOY_FESTIVAL);

        for (Meeple m : Iterables.filter(activePlayer.getMeeples(), MeeplePredicates.deployed())) {
            action.add(new MeeplePointer(m));
        }
        if (!action.isEmpty()) {
            actions.add(action);
        }
    }
View Full Code Here

Examples of com.jcloisterzone.action.UndeployAction

        return game.hasCapability(SiegeCapability.class);
    }

    @Override
    public void enter() {
        UndeployAction action = prepareEscapeAction();
        if (prepareEscapeAction() != null) {
            game.post(new SelectActionEvent(getActivePlayer(), action, true));
        } else {
            next();
        }
View Full Code Here

Examples of com.jcloisterzone.action.UndeployAction

        }
    }


    public UndeployAction prepareEscapeAction() {
        UndeployAction escapeAction = null;
        for (Meeple m : game.getDeployedMeeples()) {
            if (m.getPlayer() != getActivePlayer()) continue;
            if (!(m.getFeature() instanceof City)) continue;

            FeatureVisitor<Boolean> visitor = game.hasRule(CustomRule.ESCAPE_RGG) ? new FindNearbyCloisterRgg() : new FindNearbyCloister();
            if (m.getFeature().walk(visitor)) {
                if (escapeAction == null) {
                    escapeAction = new UndeployAction(SiegeCapability.UNDEPLOY_ESCAPE);
                }
                escapeAction.add(new MeeplePointer(m));
            }
        }
        return escapeAction;
    }
View Full Code Here

Examples of org.jboss.as.cli.gui.metacommand.UndeployAction

        JMenuItem deploy = new JMenuItem(new DeployAction(cliGuiCtx));
        deploy.setMnemonic(KeyEvent.VK_D);
        metaCmdMenu.add(deploy);

        JMenuItem unDeploy = new JMenuItem(new UndeployAction(cliGuiCtx));
        unDeploy.setMnemonic(KeyEvent.VK_U);
        metaCmdMenu.add(unDeploy);

        return metaCmdMenu;
    }
View Full Code Here

Examples of org.jboss.as.cli.gui.metacommand.UndeployAction

        JMenuItem deploy = new JMenuItem(new DeployAction(cliGuiCtx));
        deploy.setMnemonic(KeyEvent.VK_D);
        metaCmdMenu.add(deploy);

        JMenuItem unDeploy = new JMenuItem(new UndeployAction(cliGuiCtx));
        deploy.setMnemonic(KeyEvent.VK_U);
        metaCmdMenu.add(unDeploy);

        return metaCmdMenu;
    }
View Full Code Here

Examples of org.jboss.gwt.circuit.sample.wmm.actions.UndeployAction

                else if (action instanceof DeployAction) {
                    DeployAction deployAction = (DeployAction) action;
                    Deployment deployment = deployAction.getDeployment();
                    deployments.put(deployment.getName(), deployment.getServer());
                } else if (action instanceof UndeployAction) {
                    UndeployAction undeployAction = (UndeployAction) action;
                    Deployment deployment = undeployAction.getDeployment();
                    deployments.remove(deployment.getName(), deployment.getServer());
                }
                channel.ack();
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.sample.wmm.actions.UndeployAction

                else if (action instanceof DeployAction) {
                    DeployAction deployAction = (DeployAction) action;
                    Deployment deployment = deployAction.getPayload();
                    deployments.put(deployment.getName(), deployment.getServer());
                } else if (action instanceof UndeployAction) {
                    UndeployAction undeployAction = (UndeployAction) action;
                    Deployment deployment = undeployAction.getPayload();
                    deployments.remove(deployment.getName(), deployment.getServer());
                }
                channel.ack();
            }
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.