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.
Pardon my lack of knowledge, but what do you mean by 'mutating input'? 'Cause I'm facing the same issue as you.
ok but, again, don't consider your approach as a solution (that is, if you kept it). If you keep that habit of mutating the input, you'll trigger hatred from your colleagues to be because you'll create bugs hard to track! ;)
looks like I did mutate the input, it is working now, not getting the issues anymore with the draw tests, thanks!
done. You shouldn't have problems anymore. But Don't mutate the inputs!
I can confirm that the expected results should be the following:
Tho, what's weird is that, when I run my solution (which expects those output), I never get any fail in the random tests. So... Are you absolutely sure you read the assertion messages correctly?
Investigating further: the reference solution is expecting the same results. You messed something in your logs. Closing.
(note: ooooh... Lemme guess: you mutate the input array, right? Do NEVER mutate the input. When you do so, nothing can be guaranteed anymore and you're just facing it right now. I'll update the test suite)
anyone else having problems with the ruby random tests? I manually tested a couple I got wrong but even drawing it out on a grid, it should have passed. Issues seem to be with the Draw tests.
["B_Red", "D_Yellow", "D_Red", "A_Yellow", "F_Red", "C_Yellow", "F_Red", "A_Yellow", "E_Red", "F_Yellow", "C_Red", "F_Yellow", "C_Red", "E_Yellow", "E_Red", "A_Yellow", "E_Red", "B_Yellow", "B_Red", "C_Yellow", "D_Red", "E_Yellow", "B_Red", "E_Yellow"]
-> expected draw, but the winning move is horizontal red
["D_Red", "F_Yellow", "A_Red", "G_Yellow", "B_Red", "D_Yellow", "C_Red", "D_Yellow", "A_Red", "B_Yellow", "E_Red", "D_Yellow", "C_Red", "G_Yellow", "B_Red", "D_Yellow", "G_Red", "B_Yellow", "F_Red", "A_Yellow", "G_Red", "E_Yellow", "F_Red", "A_Yellow", "C_Red", "F_Yellow", "F_Red", "D_Yellow"]
#-> expected draw, yellow actually wins bottom horizontal
["F_Red", "D_Yellow", "G_Red", "A_Yellow", "D_Red", "C_Yellow", "F_Red", "B_Yellow", "G_Red", "A_Yellow", "D_Red", "E_Yellow", "D_Red", "A_Yellow", "C_Red", "A_Yellow", "G_Red", "E_Yellow", "A_Red", "D_Yellow", "D_Red"]
#-> expected draw, yellow actually wins bottom horizontal
["D_Red", "F_Yellow", "B_Red", "C_Yellow", "D_Red", "C_Yellow", "D_Red", "E_Yellow", "G_Red", "B_Yellow", "G_Red", "C_Yellow", "D_Red", "E_Yellow", "F_Red", "F_Yellow", "B_Red", "D_Yellow", "A_Red", "B_Yellow", "D_Red"]
#-> expected draw, red actually wins vertically in D