Ad
  • Custom 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.

  • Custom User Avatar

    thank you! fixed

  • Custom User Avatar
  • Custom 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"
  • Custom User Avatar

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

  • Custom 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?

  • Custom 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."

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

    Well said! That's how Humanity lives :)

  • Custom User Avatar

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

  • Custom 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.

  • Custom 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.

  • Custom User Avatar

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

  • Custom 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

  • Custom 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

  • Custom User Avatar
  • Loading more items...