The potential buyer is eTeam. The potential seller is the team who invoke the function AI_TechTrade.
If we use pseudocode, it will look like
Code:
seller.AI_TechTrade(eTech, eBuyer)
The seller can trade away his Tech eTech, namely, the color of Tech eTech is white during the diplomacy negotiation, if seller.AI_TechTrade(eTech, eBuyer) return NO_DENIAL.
If eTeam == China is true, which means the potential buyer is China, in this case it is irrelevant to the tech trade restriction on China.
Thus, we only need to focus on the case that China is seller.
When the program needs to know whether China can trade away its tech, it will look like
Code:
seller.AI_TechTrade(eTech, eBuyer)
Moreover seller.getID() == China is true.
If China is controlled by a human, seller.isHuman() is true, then seller.AI_TechTrade(eTech, eTeam) will return NO_DENIAL before the monopoly check.
If China is a computer player, seller.isHuman() is false. Suppose China has monopoly on eTech, then seller.AI_TechTrade(eTech, eTeam) would return DENIAL_TECH_MONOPOLY as expected.