Examples of MeeplePointer


Examples of com.jcloisterzone.board.pointer.MeeplePointer

        }
        return false;
    }

    protected boolean selectDummyTowerCapture(TakePrisonerAction action) {
        MeeplePointer mp = action.iterator().next();
        getServer().takePrisoner(mp.getPosition(), mp.getLocation(), mp.getMeepleType(), mp.getMeepleOwner().getIndex());
        return true;
    }
View Full Code Here

Examples of com.jcloisterzone.board.pointer.MeeplePointer

        for (Meeple pf : game.getDeployedMeeples()) {
            if (!(pf instanceof Follower)) continue;
            Position pos = pf.getPosition();
            if (pos.x != p.x && pos.y != p.y) continue; //check if is in same row or column
            if (pos.squareDistance(p) > range) continue;
            captureAction.add(new MeeplePointer(pf));
        }
        return captureAction;
    }
View Full Code Here

Examples of com.jcloisterzone.board.pointer.MeeplePointer

            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.board.pointer.MeeplePointer

        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.board.pointer.MeeplePointer

            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 com.jcloisterzone.board.pointer.MeeplePointer

            if (m.getFeature().getMaster().equals(cityRepresentative) && m instanceof Follower) {
                if (princessAction == null) {
                    princessAction = new PrincessAction();
                    actions.add(princessAction);
                }
                princessAction.add(new MeeplePointer(m));
            }
        }
    }
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.