Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
thank you! fixed
fixed
Tests and kata description have been updated! Now we expect to get null if:
It should be fixed! Please, test it and let me know.
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?
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."
Well said! That's how Humanity lives :)
This comment is hidden because it contains spoiler information about the solution
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.
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.
I provided additional information about the 'yield' property and also added an example
Thank you for pointing this out! Fixed: the problem was that the production time did not take into account the amount of ingredients needed
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
fixed
Loading more items...