7 kyu

Talisman Board Game Combat System Checker

40 of 413Mackay
Description
Loading description...
Games
Algorithms
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • Mr_Silky_Thigh Avatar

    I suggest fixing a few sentences in the Instructions for clarity. My suggested versions are below:

    -If the player has at least 6 more power than the enemy (including modifiers), the player automatically wins, as the enemy's combat score couldn't possibly exceed the player's.

    -If the player has less power than the enemy (including modifiers), the player can only win if the enemy rolls low enough for the player to have a chance. In this instance, the method should return a range equal to the ENEMY’s dice rolls which would give the player a chance to win.

  • rowcased Avatar

    in description Player 1 rolls a ' should be Player 1 rolls a 4

  • FArekkusu Avatar

    The "(1..0)" test should be a sample test, not only fixed. Moreover, it's nowhere said that ending up in a tie (which leads to this outcome) means auto-lose.

    EDIT: In the case of a tie combat ends with neither player losing a life. I wonder what's wrong with this statement...

  • Blind4Basics Avatar
    • implementation corrected in JS, python and ruby (see message just below this one)
    • random tests added in ruby ( my first ruby code... XD )
    • fixed test added to ensure the '(1..0)' answer won't show up...
    • invalidate ALL previous solutions... (well, they were wrong...)
    • resolved issue...
    • approved!
  • appsincaps Avatar

    I think it's incorrect to output (1..0) when the difference between the player and the enemy is -5. It's meaningless and there's no way the player can win in this case.

  • jolaf Avatar

    In the kata description the function to be implemented is called get_requirements, yet in the code it is called get_required.

  • madbook Avatar

    The only issue I had was that the kata started with the function defined as getRequirements, but it actually needs to be getRequired.

  • GiacomoSorbi Avatar

    Translated into both Python and JS, if you want to approve it.

    Once you are done (provided my work is ok with you, of course!), tell me if you may be interested to adding random tests to the Ruby version too and remember me to fix the function in the description examples (get_required, not get_requirements, but if you change it now, approving the translation may become troublesome).

    Oh, and in any case, thanks for the kata and great work explaining what you expect as an output in every detail :)

  • taw Avatar

    This comment has been hidden.

  • craecke Avatar

    It's strange to me that the expected range is of the player's possible rolls when the player has a higher initial score, but that it's of the opponent's possible rolls otherwise. If the opponent's initial score is, say, three points higher than the player's score, wouldn't it make more sense to have the expected result be (4..6) to reflect the player's rolls that could result in not losing, so that a returned range always refers to the same player?