Ad
  • Default User Avatar

    Nothing is broken! 217 people did this kata without any problems.
    So where is the concrete problem?

  • Custom User Avatar

    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.

  • Custom User Avatar

    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... :)