Examples of TilePlacementList


Examples of com.barrybecker4.puzzle.tantrix.model.TilePlacementList

     * @return null if the resulting permuted path is not valid (i.e. has overlaps)
     */
    private TantrixPath createPermutedPath(TantrixPath subPath1, TantrixPath subPath2) {

        // add tiles from the first path in reverse order
        TilePlacementList tiles = new TilePlacementList();
        for (TilePlacement p : subPath1.getTilePlacements()) {
            tiles.addFirst(p);
        }

        tiles.addAll(pivotPath.getTilePlacements());
        tiles.addAll(subPath2.getTilePlacements());
        TantrixPath path = null;
        if (isValid(tiles)) {
            assert (TantrixPath.hasOrderedPrimaryPath(tiles, path_.getPrimaryPathColor())) :
                    "out of order path tiles \nsubpath1" + subPath1 + "\npivot="+ pivotPath
                            + "\nsubpath2=" + subPath2 + "\norigPath="+ path_;
View Full Code Here

Examples of com.barrybecker4.puzzle.tantrix.model.TilePlacementList

        initialize(type, path);
    }

    private void initialize(PathType type, TantrixPath path) {

        TilePlacementList tiles = path.getTilePlacements();
        primColor = path.getPrimaryPathColor();

        for (int i=0; i<path.size(); i++) {
            HexTile tile = tiles.get(i).getTile();

            if (isTileType(tile, type)) {
                add(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.