Minor Annoyance
Deity
About this part of the code:
Does getBuildingBadHealth return a negative number? Because the part of the GW code with nukes has += instead of the -= found in the building bad health part so I assume getBuildingBadHealth returns negative which is reversed to positive by the -=.
Also can someone explain how random numbers, specifically here:
works. Keep in mind I don't know C++ so this is probably something basic you'd be explaining.
Lastly, I'm going to add more stuff to some of these calculations. Do I use these brackets: () these: [] or these: {}? I don't know if there's a difference or not, but I don't want to confuse things.
Code:
iGlobalWarmingValue -= pCity->getBuildingBadHealth() * iUnhealthWeight;
Also can someone explain how random numbers, specifically here:
Code:
if (getSorenRandNum(100, "Global Warming") + iGlobalWarmingDefense < GC.getDefineINT("GLOBAL_WARMING_PROB"))
Lastly, I'm going to add more stuff to some of these calculations. Do I use these brackets: () these: [] or these: {}? I don't know if there's a difference or not, but I don't want to confuse things.