public static int rotatePieceOneEighth(int p) { // Rotates a piece clockwise. int newPiece = p; newPiece = Pieces.setDirections(newPiece, Pieces.northwest(p), Pieces.southeast(p), Pieces.southwest(p), Pieces.northeast(p)); newPiece = Pieces.setDiagonals(newPiece, Pieces.left(p), Pieces.up(p), Pieces.down(p), Pieces.right(p)); return(newPiece); }