Ad
  • Custom User Avatar

    I guess you forget to mutiply the corresponding value for each race, as a results, every race in good and evil side was only added together.

    For example, for goodVsEvil('1 1 1 1 1 1', '1 1 1 1 1 1 1'), the totalGood should equal to 1* 1 + 1 * 2 + 1 * 3 + 1 * 3 + 1 * 4 + 1* 10 = 23. however, in your code, totalGood = 1 + 1 + 1 + 1 + 1 + 1 = 6.