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.
even an empty function will result in no output. this is because
console.assert()
is disabled in the preloaded section (which is invisible to you until you solve the kata). many things are disabled or otherwise hijacked in this kata, i am not sure about why this method is disabled in particular.I can;t tell what is wrong with your solution without seeing your code, but I edited tests so messages are not truncated now. Run your solution again and you should be able to see where your answer is different from the expected one.
Double check for unnecessary leading or trailing spaces in your answer.
These hands of too many unique cards. Considering two hands there can only be 9 unique cards (2 for each hand and 5 for the river) and this one has 10.
I think that most likely, your solution incorrectly sees a Yellow diagonal from B1 to F5 on move 21:
you should try to test your function with moves.slice(0, 21) and see the result
Yeah sorry, my function exits as soon as there is a winner, this is why not all moves were represented. I did not remember that in this kata the game can keep going even though there is a winner already. I printed the full board and it is the same as yours, so it seems like your function fails to recknognize the winner at some point. Can you print the state of the grid as soon as you detect a winner ? You wrote in your first message that you see Yellow winning at move 20.
Can you try to make a visual representation of the game board after all the moves have been played ? This is what i get:
Red wins by completing the diagonal from D to G.
why should we investigate if you are not even sure that the expected result is wrong ? have you played the moves manually to check ? there have been close to 1100 completions in JavaScript, the odds of a fixed test being wrong are very small. please provide more evidence before opening an issue (or ask a question instead)
Yes, it is possible. You need to find a way without arrow functions and without keywords.
Have you played poker? :P In this case it's point #3. 5 cards are involved in final ranking, and in this case it's the last card that matters (5 > 4), as the pair and 2/3 high cards were equal (suit doesn't matter in this example).
Closing then.
Passed a copy of the array to your function, now it seems it doesn't happen anymore, could you check submitting a few times and see if it is solved?
I don't see that and your code passed the kata, is it still a valid issue?
This comment is hidden because it contains spoiler information about the solution
The Node version is too low for that method on this particular kata. You'll need to figure out another method if you need that result.