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.

  • Custom User Avatar

    Each "troop" has a specified value (in the description), you don't just add it up

    Read the Kata description fully if you have a problem with a Kata.

    kcode11 gave you the answer to your issue literally one comment below yours:

    Just so everybody understands Kata right; the string is not a bool list of which fighter is present, it is a count of how many of those fighter are present (in ranking order).

    Please don't mark as an issue if you aren't sure of the problem.

    Example:

        0 0 1 1 1 0        /  0 0 0 0 0 0 1
    Elf + Dwarf + Eagle    /  Wizard
     3  +   3   +   4      /    10
           10              /    10
    
    
    10 == 10 therefore it is a draw