Ad
  • Default User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Default User Avatar

    I think that most likely, your solution incorrectly sees a Yellow diagonal from B1 to F5 on move 21:

    move 21, F_Yellow:
    
          Y      
          R   Y  
          R   R  
        R Y   Y  
    R   Y R R R Y
    Y Y R Y Y Y R
    -------------
    A B C D E F G
    

    you should try to test your function with moves.slice(0, 21) and see the result

  • Default User Avatar

    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.

  • Default User Avatar

    Can you try to make a visual representation of the game board after all the moves have been played ? This is what i get:

          Y
          R   Y
          R   R
        R Y R Y
    R   Y R R R Y
    Y Y R Y Y Y R
    -------------
    A B C D E F G
    

    Red wins by completing the diagonal from D to G.

  • Default User Avatar

    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)

  • Custom User Avatar

    Yes, it is possible. You need to find a way without arrow functions and without keywords.

  • Custom User Avatar

    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).

  • Custom User Avatar

    Closing then.

  • Custom User Avatar

    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?

  • Custom User Avatar

    I don't see that and your code passed the kata, is it still a valid issue?

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.