Package com.jcloisterzone.event

Examples of com.jcloisterzone.event.SelectActionEvent


        TakePrisonerAction captureAction = prepareCapture(pos, getBoard().get(pos).getTower().getHeight());
        if (captureAction.isEmpty()) {
            next();
            return;
        }
        game.post(new SelectActionEvent(getActivePlayer(), captureAction, true));
    }
View Full Code Here


      for (Entry<Position, Set<Rotation>> entry: getBoard().getAvailablePlacements().entrySet()) {
        for (Rotation rotation : entry.getValue()) {
          action.add(new TilePlacement(entry.getKey(), rotation));
        }
      }
        game.post(new SelectActionEvent(getActivePlayer(), action, false));
    }
View Full Code Here

        }
        if (action.isEmpty()) {
            next();
            return;
        }
        game.post(new SelectActionEvent(getActivePlayer(), action, false));
    }
View Full Code Here

        castleCap.setCastlePlayer(player);
        CastleAction action = new CastleAction();
        for (Location loc: currentTileCastleBases.remove(player)) {
          action.add(new FeaturePointer(getTile().getPosition(), loc));
        }
        game.post(new SelectActionEvent(player, action, true));
    }
View Full Code Here

        }
        if (actions.isEmpty()) {
            nextCornPlayer();
        } else {
            boolean passAllowed = cornCircleCap.getCornCircleOption() == CornCicleOption.DEPLOYMENT;
            game.post(new SelectActionEvent(getActivePlayer(), actions, passAllowed));
        }
    }
View Full Code Here

        Player wagonPlayer;
        while ((wagonPlayer = wagonCap.getWagonPlayer()) != null) {
            Feature f = rw.get(wagonPlayer);
            List<FeaturePointer> wagonMoves = prepareWagonMoves(f);
            if (!wagonMoves.isEmpty()) {
                game.post(new SelectActionEvent(getActivePlayer(), new MeepleAction(Wagon.class).addAll(wagonMoves), true));
                return true;
            } else {
                rw.remove(wagonPlayer);
            }
        }
View Full Code Here

        }
        game.prepareActions(actions, ImmutableSet.copyOf(followerLocations));
        if (isAutoTurnEnd(actions)) {
            next();
        } else {
            game.post(new SelectActionEvent(getActivePlayer(), actions, true));
        }
    }
View Full Code Here

        }

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

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

    public void enter() {
        boolean baazaarInProgress = bazaarCap != null && bazaarCap.getBazaarSupply() != null;
        boolean builderSecondTurnPart = builderCap != null && builderCap.getBuilderState() == BuilderState.BUILDER_TURN;
        if (builderSecondTurnPart || !baazaarInProgress) {
            if (abbeyCap.hasUnusedAbbey(getActivePlayer()) && ! getBoard().getHoles().isEmpty()) {
                game.post(new SelectActionEvent(getActivePlayer(), new AbbeyPlacementAction().addAll(getBoard().getHoles()), true));
                return;
            }
        }
        next();
    }
View Full Code Here

TOP

Related Classes of com.jcloisterzone.event.SelectActionEvent

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.