Code:# attitude stability iRelationStability += calculateSumScore(lAttitudes) / 2 iRelationStability += calculateSumScore(lAttitudes, 2) / 2 iRelationStability += calculateSumScore(lAttitudes, 3)
Can somebody please explain me this code?
Sorry, not sure I understood. First line -- adding all the +/- 1 attitude? Second line adding +/- 2 attitudes, and then for +/- 3? Meaning if someone is -5 against me -- he will not be counted in attitude score determination? My main problem is the second argument of Sumscore function... If it represents a threshold -- in which way mathematically does it work?
if iPlayer == iPolynesia or iVikings or iIndonesia or iNetherlands:
if iPlayer == iPolynesia or if iPlayer == iVikings or if iPlayer == iIndonesia or if iPlayer == iNetherlands:
I think what you're looking for isAs someone who learned coding with C++ I have always had a deep suspicion for Python, so I'd like to ask for confirmation, is this code:
Code:if iPlayer == iPolynesia or iVikings or iIndonesia or iNetherlands:
really 100% certainly just a shorter more elegant but otherwise functionally identical version of this:
Code:if iPlayer == iPolynesia or if iPlayer == iVikings or if iPlayer == iIndonesia or if iPlayer == iNetherlands:
?
if iPlayer in [iNetherlands, iIndonesia, iVikings, iPolynesia]:
if iPlayer == iPolynesia or iPlayer == iVikings ...
if iPlayer in [iPolynesia, iVikings, ...]:
data.iSeed % 4
Related question, I've been trying to get the scoreboard on the main screen interface scrollable but have been having trouble. Do you know of a good example I could base my code off of?