Package com.jcloisterzone.board

Examples of com.jcloisterzone.board.Location.rev()


        Tile tile = game.getCurrentTile();
        for (Entry<Location, Tile> entry : getBoard().getAdjacentTilesMap(tile.getPosition()).entrySet()) {
            Tile adjacent = entry.getValue();
            Location rel = entry.getKey();

            char adjacentSide = adjacent.getEdge(rel.rev());
            char tileSide = tile.getEdge(rel);
            if (tileSide != adjacentSide) {
                Location bridgeLoc = getBridgeLocationForAdjacent(rel);
                BridgeAction action = prepareTileBridgeAction(tile, null, bridgeLoc);
                if (action != null) return action;
View Full Code Here


        if (!tile.isBridgeAllowed(bridgeLoc)) return false;
        for (Entry<Location, Tile> e : getBoard().getAdjacentTilesMap(p).entrySet()) {
            Location rel = e.getKey();
            if (rel.intersect(bridgeLoc) != null) {
                Tile adjacent = e.getValue();
                char adjacentSide = adjacent.getEdge(rel.rev());
                if (adjacentSide != 'R') return false;
            }
        }
        return true;
    }
View Full Code Here

        for (Entry<Location, Tile> e : getBoard().getAdjacentTilesMap(p).entrySet()) {
            Tile adjacent = e.getValue();
            Location rel = e.getKey();

            char adjacentSide = adjacent.getEdge(rel.rev());
            char tileSide = tile.getEdge(rel);
            if (rel.intersect(bridgeLoc) != null) {
                if (adjacentSide != 'R') return false;
            } else {
                if (adjacentSide != tileSide) return false;
View Full Code Here

        for (Entry<Location, Tile> e : getBoard().getAdjacentTilesMap(p).entrySet()) {
            Tile adjacent = e.getValue();
            Location rel = e.getKey();

            char tileSide = tile.getEdge(rel);
            char adjacentSide = adjacent.getEdge(rel.rev());

            if (tileSide != adjacentSide) {
                if (bridgeUsed) return false;
                if (tileSide != 'R') return false;
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.