Ad
  • Default User Avatar
    • added instructions in the initial code to specify that the function has to be stateful
    • added proper random tests (previously only one game was played, since there is no way to reset the game state)
    • added the full log of dice rolls to the assertion messages
  • Default User Avatar

    Hi, I started to suspect something wrong when I looked at the example. It really doesn't work like the other katas. Thank you very much for the explanations!

  • Default User Avatar

    NULL test removed

  • Default User Avatar

    Indeed, it‘s a bit difficult, if you couldn't guess the right answer.
    Unfortunately, the difficulty level is voted by the user.
    I think it was decided to 7 kyu just because the answer is too simple -_-

  • Custom User Avatar

    Thanks, I'm glad you liked it and that it was a learning experience for you. I have been trying to come up with another networking kata but it's harder that one might think. But, comments like yours sure makes me want to try even harder, so thank you for that :) Have a happy new year.

  • Default User Avatar

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

  • Custom User Avatar
  • Default User Avatar

    Here's the relevant region of the test image, consisting of pixels of colour 5.

    5,5,5,5,5,5,5,5,5,
    5,5,5,5,5,5,5,5,5,
    5,5,5,5,5,5,5,5,5,
    5,5,5,E,E,A,5,5,5,
    5,5,5,E,A,A,5,5,5,
    5,5,5,5,5,5,
    5,5,5,5,5,5,
    5,5,5,5,5,5,

    The Es represent the expected answer: pixels 212, 213, and 241. The As are the additional pixels present in your actual solution : 214, 242, and 243.

    All the E pixels have depth 4, which is the maximum depth for any pixel in this region. But one of the A pixels (pixel 243) has depth 2: you can get out of the region of 5s by taking just one step to the right and one step down. The other two A pixels have depth 3.