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.
Nothing is broken! 217 people did this kata without any problems.
So where is the concrete problem?
Yup. The number of bricks visible for an empty string is 0, not -1. One shouldn't have to set up counter-intuitive catches just to match arbitrary tests. Those tests, and this kata, are essentially broken.
And I would never write this in production code!
A simple refactoring into a helper function would make this much more digestible!
Alas, the "one-liner factor" was too appealing... :)