Examples of EntitySelector


Examples of megamek.common.EntitySelector

            return;
        }

        Report r;

        Enumeration<Entity> stuckEntities = game.getSelectedEntities(new EntitySelector() {
            public boolean accept(Entity entity) {
                if (entity.isStuck()) {
                    return true;
                }
                return false;
View Full Code Here

Examples of megamek.common.EntitySelector

     * Remove all iNarc pods from all vehicles that did not move and shoot this
     * round NOTE: this is not quite what the rules say, the player should be
     * able to choose whether or not to remove all iNarc Pods that are attached.
     */
    private void resolveVeeINarcPodRemoval() {
        Enumeration<Entity> vees = game.getSelectedEntities(new EntitySelector() {
            public boolean accept(Entity entity) {
                if ((entity instanceof Tank) && (entity.mpUsed == 0)) {
                    return true;
                }
                return false;
View Full Code Here

Examples of megamek.common.EntitySelector

        setStatusBarText(Messages.getString("MovementDisplay.AllPlayersUnload")); //$NON-NLS-1$

        // Collect the stranded entities into the vector.
        // TODO : get a better interface to "game" and "turn"
        Enumeration<Entity> entities = client
                .getSelectedEntities(new EntitySelector() {
                    private final IGame game = client.game;
                    private final GameTurn turn = client.game.getTurn();
                    private final int ownerId = client.getLocalPlayer().getId();

                    public boolean accept(Entity acc) {
View Full Code Here

Examples of megamek.common.EntitySelector

        // Let the player know what's going on.
        setStatusBarText(Messages.getString("MovementDisplay.AllPlayersUnload")); //$NON-NLS-1$

        // Collect the stranded entities into the vector.
        // TODO : get a better interface to "game" and "turn"
        Enumeration<Entity> entities = client.getSelectedEntities(new EntitySelector() {
            private final IGame game = client.game;
            private final GameTurn turn = client.game.getTurn();
            private final int ownerId = client.getLocalPlayer().getId();

            public boolean accept(Entity entity) {
View Full Code Here

Examples of megamek.common.EntitySelector

        final AmmoType atype = ammo == null ? null : (AmmoType) ammo.getType();
        // Are there any valid spotters?
        if ((null != spottersBefore) && !isFlak) {
            // fetch possible spotters now
            Enumeration<Entity> spottersAfter = game
                    .getSelectedEntities(new EntitySelector() {
                        public int player = playerId;

                        public Targetable targ = target;

                        public boolean accept(Entity entity) {
View Full Code Here

Examples of megamek.common.EntitySelector

                            direction = IOffBoardDirections.WEST;
                            break;
                        default:
                    }
                    Enumeration<Entity> thisPlayerArtyUnits = client.game
                            .getSelectedEntities(new EntitySelector() {
                                public boolean accept(Entity entity) {
                                    if (entity.getOwnerId() == client
                                            .getLocalPlayer().getId()) {
                                        return true;
                                    }
View Full Code Here

Examples of megamek.common.EntitySelector

                        case 18:
                            direction = IOffBoardDirections.WEST;
                            break;
                    }
                    Enumeration<Entity> thisPlayerArtyUnits = client.game
                            .getSelectedEntities(new EntitySelector() {
                                public boolean accept(Entity entity) {
                                    if (entity.getOwnerId() == client
                                            .getLocalPlayer().getId()) {
                                        return true;
                                    }
View Full Code Here

Examples of megamek.common.EntitySelector

            labCallsign.setText(callsign.toString());

            // Get the Protomechs of this entity's player
            // that *aren't* in the entity's unit.
            Enumeration<Entity> otherUnitEntities = client.game
                    .getSelectedEntities(new EntitySelector() {
                        private final int ownerId = CustomMechDialog.this.entity
                                .getOwnerId();
                        private final char unitNumber = CustomMechDialog.this.entity
                                .getUnitNumber();

View Full Code Here

Examples of megamek.common.EntitySelector

            tempPanel.add(labCallsign, GBC.eol().anchor(GridBagConstraints.CENTER));

            // Get the Protomechs of this entity's player
            // that *aren't* in the entity's unit.
            Enumeration<Entity> otherUnitEntities = client.game
                    .getSelectedEntities(new EntitySelector() {
                        private final int ownerId = CustomMechDialog.this.entity
                                .getOwnerId();

                        private final char unitNumber = CustomMechDialog.this.entity
                                .getUnitNumber();
View Full Code Here

Examples of org.drools.planner.core.heuristic.selector.entity.EntitySelector

                    + ")'s minimumCacheType (" + minimumCacheType
                    + ") must not be higher than " + SelectionCacheType.STEP
                    + " because the pillars change every step.");
        }
        // EntitySelector uses SelectionOrder.ORIGINAL because a SameValuePillarSelector STEP caches the values
        EntitySelector entitySelector = entitySelectorConfig.buildEntitySelector(environmentMode, solutionDescriptor,
                minimumCacheType, SelectionOrder.ORIGINAL);
        Collection<PlanningVariableDescriptor> variableDescriptors = entitySelector.getEntityDescriptor()
                .getPlanningVariableDescriptors();
        return new SameValuePillarSelector(entitySelector, variableDescriptors,
                inheritedSelectionOrder == SelectionOrder.RANDOM);
    }
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.