Ad
  • Custom User Avatar

    Before these two tests:

      Test.assertDeepEquals(Goku.battle(9), "An intense fight", "Your warrior picked a fight with a relatively strong enemy. Nothing he can't hold his/er own to. Provide the appropiate response")
        Test.assertDeepEquals(Goku.battle(14), "You've been defeated", "Your warrior picked a fight he/she can't win.")
    

    The warrior level is actually should be 4, not 3 as seen in the tests below.

        // Before
        Test.assertDeepEquals(Goku.level(), 4, "Your warrior should now be LV 4")
        Test.assertDeepEquals(Goku.experience(), 400, "Your warrior's experience should be relative to his level")
        // Now
        Test.assertDeepEquals(Goku.battle(9), "An intense fight", "Your warrior picked a fight with a relatively strong enemy. Nothing he can't hold his/er own to. Provide the appropiate response")
        Test.assertDeepEquals(Goku.battle(14), "You've been defeated", "Your warrior picked a fight he/she can't win.")
    

    With the current total experience of 400. So, gained exp is 20 * (9-4) * (9-4) = 20 * 25 which is 500. So, the new level should be 9 (because 400 + 500).

    The warrior is 5 level from 14 and is lower in rank (the warrior is Pushover, meanwhile the enemy is Novice).

  • Custom User Avatar

    Test cases for JavaScript aren't following instructions given. Exp given for battles is ( 20 * diff * diff ) however leads to errors in testing. By the time Warrior() is level 3, fights level 9, gains 720 exp, ends up as level 11, fails test because next fight is level 14 and test says the fight is supposed to be a defeat.

  • Custom User Avatar

    PHP, no sample test.

  • Custom User Avatar

    Your warrior's experience should be relative to his level: 300 should equal 400

    Log:

    Level = 9

    Experience = 800

    Rank = Pushover

    Which value is 300?
    No way it's the experience right?

  • Custom User Avatar

    Nice kata, funny to solve, well done.

  • Custom User Avatar

    Approved

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    Your level should be 3 at that test.

  • Custom User Avatar
  • Custom User Avatar

    Does not appear to be a kata issue, the warrior should be level 3 before that fight rather than level 4.

    At least that's the case with both the kata reference and top rated solutions.

  • Custom User Avatar

    It says 'experinece' (mispelling) somewhere in the Python instructions.

    not sure about other languages

  • Custom User Avatar

    Confitions
    Return "Easy fight" if your warrior is 2 or more levels higher than your enemy's level. Return "A good fight" if your warrior is either 1 level higher or equal to your enemy's level.

    I get a test (logged my level and enemy level)

    Log

    4 2

    Your enemy isn't exactly your level. Provide the appropriate response: 'Easy fight' should equal 'A good fight'

    ?????????????

  • Custom User Avatar

    I'm sure the level should be 4, but yes, there is a mistake in the string.

  • Custom User Avatar

    One of the test cases is:
    Test.assertDeepEquals(Goku.level(), 4, "Your warrior should now be LV 3")

    Is this a mistake? Why does it expect Goku.level() to be 4 when they said that it should be 3? My program is returning 3, as I thought it should be, so that's why I'm asking.

  • Custom User Avatar

    Just one final question, i have one last error, how would i view the testcase so I can figure out why the error is triggered?

    As mentioned above, you can log at certain actions done on the class methods.

  • Loading more items...