Package com.jcloisterzone.board.pointer

Examples of com.jcloisterzone.board.pointer.FeaturePointer


        for (Location loc : tile.getPlayerFeatures(player, Farm.class)) {
            if (pigAction == null) {
                pigAction = new MeepleAction(Pig.class);
                actions.add(pigAction);
            }
            pigAction.add(new FeaturePointer(pos, loc));
        }
    }
View Full Code Here


        }
        Player player = game.getAllPlayers()[pi];
        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

            for (PlayerAction<?> action : actions) {
                if (action instanceof MeepleAction) {
                    MeepleAction ma = (MeepleAction) action;
                    if (ma.getMeepleType().equals(f.getClass())) {
                        if (landingExists) {
                            ma.add(new FeaturePointer(tile.getPosition(), Location.FLIER));
                        }
                        continue followerLoop;
                    }
                }
            }

            if (allowAdd && landingExists) {
                MeepleAction action = new MeepleAction(f.getClass());
                action.add(new FeaturePointer(getTile().getPosition(), Location.FLIER));
                actions.add(action);
            }
        }
    }
View Full Code Here

            List<FeaturePointer> wagonMoves = new ArrayList<>();
            for (Entry<Location, Tile> entry : getBoard().getAdjacentTilesMap(source.getTile().getPosition()).entrySet()) {
                Tile tile = entry.getValue();
                Feature f = tile.getFeaturePartOf(entry.getKey().rev());
                if (f == null || f.walk(new IsOccupiedOrCompleted())) continue;
                wagonMoves.add(new FeaturePointer(tile.getPosition(), f.getLocation()));
            }
            return wagonMoves;
        } else {
            return source.walk(new FindUnoccupiedNeighbours());
        }
View Full Code Here

        Position pos = tile.getPosition();
        MeepleAction builderAction = new MeepleAction(Builder.class);

        for (Location loc : Iterables.concat(roads, cities)) {
            builderAction.add(new FeaturePointer(pos, loc));
        }
        actions.add(builderAction);

    }
View Full Code Here

                                    //Abbey at side;
                                    Position target = f.getTile().getPosition().add(side);
                                    Tile abbeyTile = getBoard().get(target);
                                    assert abbeyTile.isAbbeyTile();
                                    if (!abbeyTile.getCloister().walk(new IsOccupiedOrCompleted())) {
                                        wagonMoves.add(new FeaturePointer(target, Location.CLOISTER));
                                    }
                                }
                                j++;
                            }
                        }
                        break;
                    }
                }
            }

            if (feature.getNeighbouring() != null) {
                for (Feature nei : feature.getNeighbouring()) {
                    if (nei.walk(new IsOccupiedOrCompleted())) continue;
                    wagonMoves.add(new FeaturePointer(nei.getTile().getPosition(), nei.getLocation()));
                }
            }
            return true;
        }
View Full Code Here

                if (result == JOptionPane.NO_OPTION) {
                    loc = Location.ABBOT;
                }
            }
        }
        action.perform(getClient().getServer(), new FeaturePointer(pos, loc));
        return;
    }
View Full Code Here

        return null;
    }

    @Override
    protected void performAction(Position pos, Location selected) {
        action.perform(getClient().getServer(), new FeaturePointer(pos, selected));
    }
View Full Code Here

            } else {
                f = tile.getFeature(m.getLocation());
            }
            m.setFeature(f);
            f.addMeeple(m);
            game.post(new MeepleEvent(null, m, null, new FeaturePointer(m.getPosition(), m.getLocation())));
        }
        tilePackFactory.activateGroups((DefaultTilePack) game.getTilePack());
    }
View Full Code Here

        if (getTunnelTokens(game.getActivePlayer(), true) > 0) {
            tunnelActions.add(new TunnelAction(true));
        }
        for (TunnelAction ta : tunnelActions) {
            for (Road tunnelEnd : openTunnels) {
                ta.add(new FeaturePointer(tunnelEnd.getTile().getPosition(), tunnelEnd.getLocation()));
            }
        }
        actions.addAll(tunnelActions);
    }
View Full Code Here

TOP

Related Classes of com.jcloisterzone.board.pointer.FeaturePointer

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.