Examples of PrimaryPathFitter


Examples of com.barrybecker4.puzzle.tantrix.model.fitting.PrimaryPathFitter

     * @return a valid primary pth placement.
     */
    private TilePlacement findPrimaryPathPlacementForTile(TantrixBoard board, HexTile tile, boolean isLast) {

        TilePlacement lastPlaced = board.getLastTile();
        PrimaryPathFitter fitter = new PrimaryPathFitter(board.getTantrix(), board.getPrimaryColor());

        Map<Integer, Location> outgoing = lastPlaced.getOutgoingPathLocations(primaryColor);
        Location nextLocation = null;
        for (int i : outgoing.keySet()) {
            if (board.getTilePlacement(outgoing.get(i)) == null) {
                nextLocation = outgoing.get(i);
            }
        }
        assert nextLocation != null;

        TilePlacementList validFits =
                fitter.getFittingPlacements(tile, nextLocation);

        if (validFits.isEmpty())  {
            return null;
        }

View Full Code Here

Examples of com.barrybecker4.puzzle.tantrix.model.fitting.PrimaryPathFitter

        for (int i=0; i<oldIndices.size(); i++) {
           auxList.set(i, permutedPath.getTilePlacements().get(newIndices.get(i)));
        }

        PrimaryPathFitter fitter =
                new PrimaryPathFitter(permutedPath.getTilePlacements(), color);

        TilePlacementList origPlacements = permutedPath.getTilePlacements();
        for (int i=0; i<newIndices.size(); i++) {

            int oldIndex = oldIndices.get(i);
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.