public static boolean IsSquareThreatened (int SquareX, int SquareY, boolean WhiteMove, ChessPieceBase[][] TheBoard){
        for (int a=0;a<8;a++){
            for (int b=0;b<8;b++){
                if (TheBoard[a][b].isWhite==(!WhiteMove)&&TheBoard[a][b].isValidMove(SquareX,SquareY,a,b)&& isUnblockedMove(SquareX,SquareY,a,b, TheBoard)){
                    return true;
                }
            }
        }
        return false;
    }