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.
It was a joy to code. Unfortunatly, the high performance demand of the tests required sacrificing some of that joy while seeking better performance. Overall, nice kata. Thanks.
Accidentally submitted this when attempting to run the tests again after undoing a change. Oops. I would have cleaned this up, but at least it works. My first attempt at cleaning and extracting some of the duplication was too slow, so I undid changes until I got to the previous working state.
Fun fact, the bitwise operators can be used in boolean equations to prevent short circuiting. If you need both sides of an OR to run, use | (although maybe don't have boolean checks with side-effects).
When I did my solution for the first Battleship field validator, I wrote it will the possibility of adjacent ships then noticed the non-adjacency clause and added that to my code. If I had realized that clause sooner, I would have coded it very differently. This kata made me feel better about the way I coded it, since all I needed to do was to strip out of adjacency checks. Code re-use for the win.