Ad
  • Custom User Avatar

    Thanks for your response, you were right, I needed to weight them with their race values.
    Thank you!! Hope to see you again!

  • 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

    Hi!! Thanks so much for your response, I understand the problem now!!! I will code it when I come home.
    And I am so sorry that I have marked it as an issue, I will try to be more careful in the future.

    Thanks again!!! (and sorry)

  • 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
    
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution