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.
Java translation.
This comment is hidden because it contains spoiler information about the solution
Hm, I never considered the possibility of such cases. Thanks for notifying me about this, I'll look into it when I'll have the time to do so.
Yep, I agree. There are not many wrong tests, so running multiple times should be enough to pass them, but those cases you mentioned are wrong threated by the kata tests (in Python at least).
I think that there might be a problem with the Python translation with respect to a few of the random tests. The following three boards reported that "True should equal False":
x x x
o o x
o o x
================
x x o
o x o
o x x
============
o x x
o x o
x x o
In the first case, if the last move was placing an "X" in the upper right corner, wouldn't this be a valid board position? In the last two examples, if the last move was placing an "X" in the center of the board, wouldn't this also be a valid board position?
Please note that this problem is happening with very low frequency. If you hit the "Attempt" button a couple of times, you will eventually pass all the random tests.
NOTE: I am assuming that the players don't always make the most advantageous move.
Python translation.
I have approved it!
Approved
Sorry for being somewhat nitpicky. All is good now!
Ok, done.
approved by someone
Oh so you took this approach instead. I would much prefer you shuffle the mixed-case string after insertion. And
generateTestCase
is now repetitive and overly nested - the standard algorithms should help you express your intentions more cleanly:Done.
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
. (Btw try not to include'\n'
unless a task specifies so, because the way it's printed in the test logs may unnecessarily confuse people){ true, ... }
. You technically could pregenerate and shuffle 50 tests withtrue
and 50 withfalse
(and that would be the robust option), but that would require more code. In my opinion just replacing the end of yourgenerateTestCase
function with this should suffice.Loading more items...