Beta

The 8 Elements Of Spells

Description
Loading description...
Puzzles
  • Please sign in or sign up to leave a comment.
  • kalatina Avatar

    The instructions say "Each element has a unique energy requirement." but Shadow and Light are listed as having identical energy requirements. I suggest you delete the quoted line from the instructions unless you have a solution in mind, too clever for me, that relies on it's truth in which case please make it true.

  • Voile Avatar

    Comparing floating point by adding an absolute epsilon to one side makes no sense at all.

    If everything always have at most 1 decimal place, either represent it as int 10 times the actual value, or use Decimal. Deal with the floating point errors correctly.

  • user7897247 Avatar

    Definitely deserves to be an official kata :D

  • Blind4Basics Avatar

    tests are now wrong:

    compound: FW ; energy: 25.0
    needed: 25.0
    expected:<false> but was:<true>
    

    this should ofc be true!

    And your internal solution is wrong too: you have to use >= not > (even if it's unlikely that it does a difference), and the test for negative values will not take into account the EPSILON, so this is not good too.

  • Blind4Basics Avatar

    since you use non integer values, you should add specific checks for floating point errors, to be sure that it's hendled correctly. For that, you'll have to provide the EPSILON you wanna the warrior to use.

  • Blind4Basics Avatar

    The description of the problem is incomplete: you provide wrong inputs too, but you do not tell what you expect in those cases.

    • WaveSplash Avatar

      Added Rule "7. If a spell is cast with an incorrect formula (example: W3T5) it will not cast."

      Issue marked resolved by WaveSplash 7 years ago
    • Blind4Basics Avatar

      and what about the floating point troubles? Because currently, my solution does not what you expect and it systematically passes the tests.

  • dinglemouse Avatar

    This comment has been hidden.