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.
Failling the 525x525 after 160k calls... Not quite there yet :<
looks good to me
I made a simple fork on the tests. I'd be grateful if you could take a look and see if it's any good.
I just made it so the tests won't crash your browser (seriously, this kata was so annoying because of this) if you fail the tests.
The way it's set up now isn't super transparent about where you got it wrong on the random tests, but I feel like the fixed tests are good enough for debugging and the random tests are mostly for performance, so it should be fine.
I also added the number of function calls (it's really hard to find a good name for it) to the
text.it
block.I didn't add anything to the description, not because of translation problems, as those can be circumvented pretty well with code blocks and the current description already isn't very language-agnostic, but because the random tests are kind of weird and I didn't know how to explain them. I feel like it should be clear enough upon hitting attempt.
Ok, this was fun (as always a little bit sobering to see the better solutions..), though strangely, so few people attempt this one. I think it might be a good idea to give a little more introductory info on the game rules like:
"(Mega)Connect4 is played on a vertical, rectangular board. The players tokens drop in a column and stack on top of each other. The win condition is met when the token of the current move connects N-1 other tokens of the same kind in a vertical or horizontal line or a line parallel to the boards diagonals."
Kata could be made more user friendly by either:
For now it's a black box, and doesn't help users figuring out how much optimisation is required.
Not helpful at all. Even on a clean solution, no logs, we are not able to see how many tests there are, and of which sizes.
There is a room for performance improvement, but this kata is not about performance
interesting solution ;)
Thank you, found my mistake
first test: (pieces, result)
([[[0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1]], [[0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1]], [[0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0]], [[0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [0, 1, 0, 0, 1, 0]], [[0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1]], [[0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 0]]], [[[0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1]], [[1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 0]], [[0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1]], [[0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [0, 1, 0, 0, 1, 0]], [[0, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1]], [[0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 0]]])
What is the solution for first fixed test in python? I can solve all random tests but, can't find solution for 1, 3 fixed tests.
:)
Arrgh! Even there, you sneaky bastard :)
Generally you're correct but there are specific limitations in this kata which prevent you from doing that
It's Java not JavaScript. Classname should start with uppercase and use camelcase.
Loading more items...