public ArrayList<Move> KRKWhiteMovesWhereRookChecksIfKingsAreInOpposition(ArrayList<Move> allWhiteMoves) {
        ArrayList<Move> rez = new ArrayList<Move>();

        int blackKingPos = this.piecePosition[28];
        int blackKingRank = Utils.getRankFromPosition(blackKingPos);
        int blackKingFile = Utils.getFileFromPosition(blackKingPos);

        int whiteKingPos = this.piecePosition[4];
        int whiteKingFile = Utils.getFileFromPosition(whiteKingPos);
        int whiteKingRank = Utils.getRankFromPosition(whiteKingPos);

        // if kings are in opposition we find those in which white checks
        // otherwise all moves are valid
        if (this.willBlackKingBeInOppositionIfItMovesTo(blackKingPos)) {

            // we filter moves
            for (Move currMove : allWhiteMoves) {
                int movedPiece = Utils.getMovedPieceFromMoveNumber(currMove.moveNumber);
                int to = Utils.getTargetPositionFromMoveNumber(currMove.moveNumber);

                // rook moves
                if (movedPiece == 0 || movedPiece == 7) {
                    int rank = Utils.getRankFromPosition(to);
                    int file = Utils.getFileFromPosition(to);

                    boolean sameRank = rank == blackKingRank;
                    boolean sameFile = file == blackKingFile;

                    boolean sameFileWhiteKing = file == whiteKingFile;
                    boolean sameRankWhiteKing = rank == whiteKingRank;

                    if ((sameRank && !sameRankWhiteKing) || (sameFile && !sameFileWhiteKing)) {
                        rez.add(new Move(currMove.moveNumber));
                    }

                }
            }
        }
        else {
            return allWhiteMoves;
        }
        return rez;
    }