Ad
  • Default User Avatar

    I suggest including additional test cases, such as an empty array, an array containing negative numbers, and an array with floating-point numbers. Alternatively, you could explicitly mention in the description that these types of inputs are not permitted.

  • Default User Avatar

    thank you! fixed

  • Default User Avatar
  • Default User Avatar

    Tests and kata description have been updated! Now we expect to get null if:

    • the resource being sought is a natural resource
    • there is no corresponding recipe in our collection
    • the requested amount is less than or equal to 0"
  • Default User Avatar

    It should be fixed! Please, test it and let me know.

  • Default User Avatar

    Thanks for this issue!
    I intend to revise the task description and include a note specifying that the resulting values should have a maximum of 2 decimal places to prevent the occurrence of extended floating-point values in random tests.
    do you agree?

  • Default User Avatar

    The solution to this kata serves as a singletone service! Passing a constant collection as a parameter each time is not advisable, as CW users will be working with it throughout the kata. The code written in the 'Initial Solution' shows that when creating an instance of the class, the class will receive a collection of recipes. You can also see this in the "Example Test Cases."

  • Default User Avatar
    in that case nothing costs anything because natural resources are free

    Well said! That's how Humanity lives :)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I chose a class and named it 'Service' strictly for architectural reasons. In this case, the class acts as a singleton. Therefore, during class initialization, we set the collection of recipes with which this class subsequently works.

    1 stone cost null because is a "natural resource".

    Quote: "natural resources" in the collection have null value Example: 'iron-ore': null

    so, it costs nothing.

  • Default User Avatar

    Thank you for bringing up this issue! In the thread below, I responded to a similar issue. So, I made changes to the description and attached an example.

  • Default User Avatar

    I provided additional information about the 'yield' property and also added an example

  • Default User Avatar

    Thank you for pointing this out! Fixed: the problem was that the production time did not take into account the amount of ingredients needed

  • Default User Avatar

    I'm closing this issue because of an erroneous guess, I just want to bring a little more meaning and history to the tasks on the CW

  • Default User Avatar
  • Loading more items...