•      [[ '-', '-', '-', '-', '-', '-', '-' ],
          [ '-', '-', '-', '-', '-', '-', '-' ],
          [ '-', '-', '-', '-', |Y|, '-', '-' ],
          [ '-', '-', '-', |Y|, 'R', '-', '-' ],
          [ '-', 'R', |Y|, 'R', 'Y', '-', '-' ],
          [ 'R', |Y|, 'R', 'Y', 'R', 'Y', 'R' ]]
    
  • JS task
    I confused a little with task expectation declared in the tests.
    for example,

    For the board:

         [[ '-', '-', '-', '-', '-', '-', '-' ],
          [ '-', '-', '-', '-', '-', '-', '-' ],
          [ '-', '-', '-', '-', 'Y', '-', '-' ],
          [ '-', '-', '-', 'Y', 'R', '-', '-' ],
          [ '-', 'R', 'Y', 'R', 'Y', '-', '-' ],
          [ 'R', 'Y', 'R', 'Y', 'R', 'Y', 'R' ]]
    
    • Expected: 'Y', instead got: 'R'

    Why in current example 'Y' won?

  • alr raised as issue

  • Don't assume there will always be a single space between words.

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

  • thank you

  • Anyway, I suggest making your own observations/comparisons if the reported ones are unclear. You have the input and the expected output. Make sure to be very careful when comparing, for example if you eyeball two results you might not spot differences that are there, differences that might not even be visible. Test whether the values are equal instead, using == or whatever other comparison operation is suitable.

  • Start by figuring out what's preventing you from continuing, and then ask specifically about that.
    You have an error message. Do you understand it? Do you agree with it?
    If you are not confident about your observations being accurate you may additionally need to show your code or others have no hint to what the situation is.
    And especially, don't rely on things being self-evident. Others may not think so. Say what you have on your mind.

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

  • Closing as it is not a kata issue.

    All spaces in the string should be retained

    Please, read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution

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

  • The most common mistake people make with this kata is assuming that there will only be one space character between words

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

  • Right! it was a bit tricky to get, sorry :)

  • 'desserts stressed' isn't the input value, that's the expected value. The test is ok.

    Please, read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution

  • Loading more items...