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.
Poker question no. 1:
it("Highest pair wins", function() { assert(Result.loss, "6S AD 7H 4S AS", "AH AC 5H 6H 7S");});
--> Is this an error in the test cases? (the pair is equal: both have a pair of aces)
--> Is this saying that only in case of an equal pair, the suit is relevant? (clubs beats spades)
--> Is this saying that in case of an equal pair, the highest card is deciding? (5 beats 4)
Go preloaded tests are not quite right. It doesn't correctly pick up the set variables
clues
andexpected
. I assume because the examples run after all lines of the Describe are evaluated, so the way it's done it only runs with last clues and examples. Could we move setting these variables inside theIt
?image is broken in the description.
This comment is hidden because it contains spoiler information about the solution
Python (probably other languages also) too: modifying input can influence the random tests: see this
[Python]
Random tests are full of cheaters, e.g.:
There can't be two "three of a kind" with the same cards.
My solution passed, but does not work properly:
my hand "7C 7S 2S 2H AH" wins against "KC KH 5D QS QC".
A test is missing for this case I guess.
This kata is a candidate for retirement as broken: https://github.com/codewars/content-issues/issues/205
Please share your opinion how to handle this broken kata: retire? fix? Something else?
I solved it using python and 7 basic tests pass without a problem, but at "Random coordinates" attempt I get a message "None should equal '11'". Could someone help me understand why this is happening?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
my barbaric Python solution takes ~.3sec/puzzle on my machine, passes sample tests. But it fails all 16 random tests, taking ~9.5 sec to do so. Interestingly, the stderr output reads:
((), (), (), ()) should equal ((1, 3, 4, 2), (4, 2, 1, 3), (3, 4, 2, 1), (2, 1, 3, 4))
when I plug the result into solution, my puzzle solver solves it correctly.
What might be going on here? Too sloooooow or am I missing something else? 🤔
In the JavaScript version empty classes pass the tests
I'm using
random.NextDouble()-0.5
the shuffle a list. This should work, wouldn't you agree?Is it a hidden requirement to use
Next
only?Loading more items...