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.
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."
I think that we should bend the rules a bit more, to ease testing the perf constraint: we could keep playing in the board even after the first
True
answer. What's your opinion?(note: it looks like your solution has some kind of bug, btw... don't return from test_rand when res is True and you'll see it popping out.)
The Java verification solution is rather slow. It should at some point get replaced by a better method. Mine isn't that much faster.
I tried to read your test code: it's pretty hard to follow... ;o
Because of the size of the data, it's pretty hard to debug.
Not easy to do but some graphic representation would be useful.
Like green for good placements and red for conflicts or something like that.