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.
Maybe things changed since your comment, but you can pass strings as well to
test
This comment is hidden because it contains spoiler information about the solution
Confirming that the "Draw" cases appear to have been corrected! Hooray!!! (And, thanks!)
(Also, the example above was missing a check for SE to NW diags. Which has also been corrected.)
Second that ^
7 fail for me. All of the following format:
Expected: 'Yellow', instead got: 'Draw'
My code correctly predicts "Draw" but, in all 7 cases, one of the two players is expected (incorrectly.)
[ [ '', '', '', '', '', '', 'R' ],
[ '', 'Y', '', 'R', 'R', '', 'Y' ],
[ '', 'Y', '', 'Y', 'R', '', 'Y' ],
[ 'R', 'R', '_', 'R', 'Y', 'R', 'Y' ],
[ 'R', 'R', 'Y', 'Y', 'R', 'Y', 'R' ],
[ 'Y', 'Y', 'R', 'R', 'Y', 'R', 'Y' ] ]
Sorry about the formatting - doesn't render correctly in the comments here but if you copy it into a markdown reader it'll show the last game state.
Nit: the test cases pass in ints not strings. This precludes some very large numbers from being used as arguments (especially in JS which has a lower highest int)!