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.
exactly
Lambda functions are fun for one liners on codewars problems, though.
You didn't get lechevalier's point: it's not an update of the description that is needed but an update of your tests (really).
What you should do is to test for hardcoding by generating a lot of grids (at least 100) accumulated in a set (that would need to convert them in a hashable form) and then compare its length against the average probability to generate different grids (I don't have enough time just now to calculate it). The idea is: if you got a length of 10, clearly, the grids are hardcoded. And note that the way you're testing it for now, you wouldn't catch a solution that return alternatively only 2 grids!
I am indeed testing if a solution is reused rather than hard coding. Although it wouldn't be a nice solution people could hardcode the solution so I changed the description so reflect this notion.
Good suggestion and would make sense from methodical point of view but for a game it would be unfair if one player gets more cards than the other. So I included some tests that give one player slightly more cards than the other.
You don't say in description that solutions for same input must be distinct.
You mention hard coding but a solution can be generated twice without being hard coded.
So test for hardcoding in your suite is at the moment wrong.
Please either edit description or remove this test
No, what I suggested was to have different numbers for the arguments R and B (=> 4 times R and 6 times B, for example).
;)
Thanks for having a look at the kata but I fear I cannot follow. There is a test that checks for matrixes overlapping. So can't be an 'R' in R's matrix when there is a 'B' in B's matrix. Hence, the matrixes are already required to be different.
You could add some tests with R != B (see this)
No.
You want the whole tests cases to be in a closure, not just the validator.
I'll fix it again then :P
That's great. I tried to model the rules of Codenames Duet in the kata but I don't know if there should be a "Black 8 Agent" like in the normal codenames version.
Thanks, I also changed the test a minute ago to be wrapped in a closure. Are we now in a limbo state with multiple valid katas?
Done it myself
Coincidentally I was just playing Codenames Duet yesterday!
You should put your tests inside a closure.
Otherwise, solutions like this one can pass.
Loading more items...