Ad
  • Custom User Avatar

    Thanks, will you or I make a SQL translation ;)

  • Custom User Avatar

    approved :)

  • Default User Avatar

    Yeah, I went ahead and refactored the missing logic to complete this kata, thanks!

  • Default User Avatar

    The tests aren't wrong, your code is incorrect. You aren't using the values of the races at all in your code, that's why it's not working. This isn't a simple "sum up the numbers in each string and see which one is bigger" type problem. Each number in each input represents the number of a certain race or class for that side.

    For example, if your good input is 1 2 3 4 5 6, then the good side has 1 hobbit, 2 men, 3 elves, 4 dwarfs, 5 eagles, and 6 wizards. Each one of those things has a different "worth". You can see their worths in the description. 1 wizard has the same amount of "worth" as 10 hobbits, for example.

    Did you read the description and just think "Wow, they're really going on about hobbits and orcs and stuff and this has nothing to do with the task"?

  • Default User Avatar

    I certainly need help with this Kata. There are several tests that are not working properly, such as one where it should be a tie but instead the test is expecting Evil to win. My code works with the examples on the kata description but when it comes to the attempts, the thing simply fail: Is there a way to fix the tests, please?

    1 1 1 1 1 1
    1 1 1 1 1 1
    Test Failed
    Expected string length 48 but was 45. Strings differ at index 15.
    Expected: "Battle Result: Evil eradicates all trace of Good"
    But was: "Battle Result: No victor on this battle field"
    --------------------------^

    Log
    0 0 0 0 0 10
    1 1 1 1 1 1
    0 1 0 0 0 0
    Test Failed
    Expected string length 38 but was 45. Strings differ at index 15.
    Expected: "Battle Result: Good triumphs over Evil"
    But was: "Battle Result: No victor on this battle field"
    --------------------------^
    Completed in 1.6080ms
    ShouldBeATie
    Log
    1 0 0 0 0 0
    0 0 0 0 0 0
    1 1 1 1 1 1
    1 0 0 0 0 0
    0 1 0 0 0 0
    0 1 0 0 0 0
    0 1 0 0 0 0
    0 0 1 0 0 0
    0 0 0 1 0 0
    1 0 0 0 1 0
    Test Failed
    Expected string length 45 but was 38. Strings differ at index 15.
    Expected: "Battle Result: No victor on this battle field"
    But was: "Battle Result: Good triumphs over Evil"

  • Default User Avatar

    It appears there may be some problems with the C# test cases for this Kata. My original solution passed the test prior to submission, then failed submission tests. When converting the algorithm to javascript (and presumably a different set of test cases) it appears that the same code passed through to submission.

  • Custom User Avatar

    No, it's not weird. You're not using the race's worth, that's why your code is wrong, read the description again.

  • Custom User Avatar

    Same sentiments here

  • Custom User Avatar

    Check this out: https://docs.codewars.com/training/troubleshooting#print-input

    About your code, you're not using the race's worth at all. Read the description again.

  • Custom User Avatar

    Hello, I don't understand this task. Can I share my code here? I used three examples and the tests were successful.
    Another test was nonsuccess, but I cannot see examples of test... input.
    Can you help me, please? Thank you

  • Default User Avatar

    Unspecified AssertionError

    The assert libary has problem?

    please change to chai

  • Custom User Avatar

    Yes, correct

  • Custom User Avatar

    Which language ? Python ?

  • Custom User Avatar
  • Custom User Avatar
  • Loading more items...