Examples of rotateCCW()


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

            //check river connection
            Location tileRelativePosition = e.getKey();
            Tile placedTile = e.getValue();
            if (placedTile.getRiver() == null) return false; //e.g. count of carcassone preplaced tiles
            boolean r1 = tileRelativePosition.rotateCCW(tile.getRotation()).isPartOf(tile.getRiver());
            boolean r2 = tileRelativePosition.rotateCCW(placedTile.getRotation()).rev().isPartOf(placedTile.getRiver());
            if (!(r1 & r2)) return false;

            //check U-turn
            Location continueRiver = tile.getRiver().rotateCW(tile.getRotation()).substract(tileRelativePosition);
View Full Code Here

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

            //check river connection
            Location tileRelativePosition = e.getKey();
            Tile placedTile = e.getValue();
            if (placedTile.getRiver() == null) return false; //e.g. count of carcassone preplaced tiles
            boolean r1 = tileRelativePosition.rotateCCW(tile.getRotation()).isPartOf(tile.getRiver());
            boolean r2 = tileRelativePosition.rotateCCW(placedTile.getRotation()).rev().isPartOf(placedTile.getRiver());
            if (!(r1 & r2)) return false;

            //check U-turn
            Location continueRiver = tile.getRiver().rotateCW(tile.getRotation()).substract(tileRelativePosition);
            if (continueRiver == Location.INNER_FARM) return true; //lake
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.