Ad
  • Custom User Avatar

    In my opinion it's too simple to be kata, could for example include some conditional to check whether player is dead/alive, how much health is remaining, how much more damage could take... essentially print some stats :)

  • Custom User Avatar

    No, I tried BigNum but that didn't help. The only one solution that comes to my mind (besides fixing tests) is to write a function that mimic floats rounding of the original platform/ruby version/language.

  • Custom User Avatar

    It seems that hardcoded values in tests are generated in different language than ruby(or on diffrerent platform/ruby version)
    as there is small difference in floating-point calculation. Shouldn't those tests just check for the difference and if it's small enough assume values are equal?

    example:

    Testing for 235
    Expected: "112.77777777777779 is above freezing temperature", instead got: "112.77777777777777 is above freezing temperature"