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.
This comment is hidden because it contains spoiler information about the solution
Thank you for your fast response. Sorry that I was not detailed enough.
With 'important method' I meant all the methods that are required for the kata.
Extra methods I created myself I am not logging, they are not part of the interface used by the tests.
I have some difficulty with providing more detailed information because I cannot see the test code itself. Only the output that it gives. But maybe I am unaware of a way to see the testcode.
I think it is test case 15.
describe block: "Mutating, adding, add_chaining and valence numbers consistencies"
it block: "Check all possible mutations and correct behavior of 'add' on the mutated atom"
There are no names given for the molecules.
The return values from the formula method with the 3 sequences I described are 'CH4', 'CBr4', and 'H'. As I would expect.
I cannot get testcase 27 to pass with Ruby. How can I figure out what test assertion is failing?
The error message is very generic: 'Testing raw formula with mutation'
The title of the testcase is: "Check all possible mutations and correct behavior of 'add' on the mutated atom"
I printed to the log whenever an important method was called, when I try that sequence myself all results are what I would expect.
The log I created:
"brancher call: [1]"
"mutate call: [[1, 1, "C"]]"
"closer call:"
"formula call:"
"brancher call: [1]"
"mutate call: [[1, 1, "C"]]"
"add call: [[1, 1, "Br"], [1, 1, "Br"], [1, 1, "Br"], [1, 1, "Br"]]"
"closer call:"
"formula call:"
"brancher call: [1]"
"mutate call: [[1, 1, "H"]]"
"closer call:"
"formula call:"```
"-> nope, that list of attacks leads actually to the numbers 2,2,1,1, boats 1 & 2 sunken, the "3" untouched."
I do indeed get the numbers 2,2,1,1 and thus 1 boat is sunken, 1 damaged, and 1 untouched. Just like the second sample test case is expecting. I am solving in ruby.
So this is in contrast to the result that Blind4Basics gave that 2 boats are sunken. I got confused by that comment and somehow overlooked that boat 1 had a length of 3 in the example given.
Anyway nice kata, I did get confused but that is not necessarily bad practice in my opinion.
I wrote here that my solution returned 11 in your example but 1064 in the medium pyramid but that was not true.
Actually I changed the test case myself to 1064 and when I fixed my algorithm the testcase failed.
Rookie mistake.
You are missing a couple of possibilities. For example the grouping 91, 74, 85, 81 gives 331.