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.
Very fun kata! I really like practical (data/analysis) puzzles like these.
I've made a PHP translation, if you're okay with that, I'd appreciate a review.
I think the risk of being marked/banned as a 'cheater' for anything to do with this particular kata is low.
It turns out to be very challenging to write a mystery puzzle like this and not inadvertently leave in some way to beat it the 'wrong' way.
If you have some more information about what happened, and it is something that can be fixed in the kata itself, it should be fixed, of course!
This comment is hidden because it contains spoiler information about the solution
Fun small-scoped kata. It's really is one of those challenges that you run across in practice.
Very tiny improvement: fix the typo in
test_it_wont_assign_people_to_who_they_gifts_to_last_year
totest_it_wont_assign_people_to_who_they_gave_to_last_year
.Great! I'll use that approach instead of the spy, that's much cleaner. Updated again.
This comment is hidden because it contains spoiler information about the solution
Woah, thanks for pointing this out!
So
die()
is not considered a failure? That's a shame; I was looking for a simple way to do this; do I have to resort to a 'spy'-solution, where I use state to detect 'incorrect' calls and fail them in the test, instead?Bonus points for naming:
Unraveller
and->unravel()
.I was, but I was wrong. Somehow it never popped up for me on many runs, even though the bug was still in there.
I am sure it's fixed now, though, updated again.
I've made an update that forces an element of the puzzle that was unintentionally optional and prevents some 'brute force'.
This is likely to invalidate current solutions. Sorry ;]
Increased the random amount to at least 100.
Fixed!
Good catch! I'll fix it. I thought I made it impossible for that to happen, but I guess I missed a duplicate value somewhere.
Fair enough, I can easily increase the amount. Since the tests are fasts, I don't see a downside.
Yup, looks like you won the brownie prize :D
Loading more items...