Ad
  • Default User Avatar

    Thank you, it was really a great Kata!

    The tests for preconditions were annoying, though. I'd prefer no invalid inputs in the big test cases.

  • Default User Avatar

    Thanks, for some reason I was assuming straight directions only.

  • Default User Avatar

    Here's the relevant part of the input again. Cells X and Y both have colour 5.

    6 6 5 5 5 5
    5 5 5 5 5 5
    5 5 X Y 5 5
    6 6 5 5 5 5
    6 6 5 5 5 5
    6 6 5 5 5 5
    

    Cell Y has depth 3, but the depth of cell X is only 2 (one step down and one step left get you to a differently-coloured cell). So, X isn't part of the solution.

  • Default User Avatar

    This was the real input during the random test:

    int[] image_data = {
                    6,6,6,6,6,7,5,5,5,5,5,5,5,5,7,7,7,7,5,7,6,6,6,6,6,7,7,6,7,
                    6,6,6,6,6,7,5,5,5,5,5,5,5,5,7,7,7,7,5,7,6,6,6,6,6,7,7,6,7,
                    6,6,6,6,6,7,5,5,5,5,5,5,5,5,7,7,7,7,5,7,6,6,6,6,6,7,7,6,7,
                    7,7,7,6,5,5,7,7,7,7,7,7,7,7,5,5,5,5,6,7,6,6,6,6,6,6,6,7,7,
                    7,7,7,6,5,5,7,7,7,7,7,7,7,7,5,5,5,5,6,7,6,6,6,6,6,6,6,7,7,
                    7,7,7,6,5,5,7,7,7,7,7,7,7,7,5,5,5,5,6,7,6,6,6,6,6,6,6,7,7,
                    7,7,7,6,5,5,7,7,7,7,7,7,7,7,5,5,5,5,6,7,6,6,6,6,6,6,6,7,7,
                    7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6,6,6,7,6,6,6,6,6,6,7,7,6,7,
                    7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6,6,6,7,6,6,6,6,6,6,7,7,6,7,
                    6,6,6,7,5,5,7,7,7,7,5,5,5,5,6,6,6,6,7,6,6,6,6,6,6,5,5,7,7,
                    6,6,6,7,5,5,7,7,7,7,5,5,5,5,6,6,6,6,7,6,6,6,6,6,6,5,5,7,7,
                    6,6,6,7,5,5,7,7,7,7,5,5,5,5,6,6,6,6,7,6,6,6,6,6,6,5,5,7,7,
                    6,6,6,7,5,5,7,7,7,7,5,5,5,5,6,6,6,6,7,6,6,6,6,6,6,5,5,7,7,
                    6,6,6,7,5,5,7,7,7,7,5,5,5,5,6,6,6,6,7,6,6,6,6,6,6,5,5,7,7,
                    6,6,6,7,7,7,6,6,6,6,5,5,5,5,7,7,7,7,7,7,6,6,6,6,6,6,6,5,5,
                    6,6,6,7,7,6,6,6,6,6,7,7,7,7,7,7,7,7,5,6,7,7,7,7,7,5,5,5,6,
                    6,6,6,7,7,6,6,6,6,6,7,7,7,7,7,7,7,7,5,6,7,7,7,7,7,5,5,5,6,
                    6,6,6,7,7,6,6,6,6,6,7,7,7,7,7,7,7,7,5,6,7,7,7,7,7,5,5,5,6,
                    6,6,6,7,7,6,6,6,6,6,7,7,7,7,7,7,7,7,5,6,7,7,7,7,7,5,5,5,6,
                    6,6,6,7,6,5,6,6,6,6,5,5,5,5,7,7,7,7,7,7,5,5,5,5,5,6,6,5,6,
                    7,7,7,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,5,5,5,5,5,5,5,6,5,
                    7,7,7,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,5,5,5,5,5,5,5,6,5,
                    5,5,5,7,5,7,6,6,6,6,5,5,5,5,6,6,6,6,6,7,6,6,6,6,6,6,6,5,5,
                    5,5,5,7,5,7,6,6,6,6,5,5,5,5,6,6,6,6,6,7,6,6,6,6,6,6,6,5,5,
                    5,5,5,7,5,7,6,6,6,6,5,5,5,5,6,6,6,6,6,7,6,6,6,6,6,6,6,5,5,
                    6,6,6,7,7,6,6,6,6,6,6,6,6,6,5,5,5,5,6,6,6,6,6,6,6,7,7,5,5,
                    6,6,6,7,7,6,6,6,6,6,6,6,6,6,5,5,5,5,6,6,6,6,6,6,6,7,7,5,5,
                    5,5,5,7,6,7,5,5,5,5,5,5,5,5,5,5,5,5,6,6,7,7,7,7,7,5,5,5,5,
                    5,5,5,7,6,7,5,5,5,5,5,5,5,5,5,5,5,5,6,6,7,7,7,7,7,5,5,5,5,
            };
    
  • Custom User Avatar

    what's the input?

  • Default User Avatar
  • Custom User Avatar

    In what language?

  • Default User Avatar

    Right now the random test is failing. But it seems to expect a wrong solution:

    6 6 5 5 5 5
    5 5 5 5 5 5
    5 5 <FONT COLOR="#ff0000">5 5</FONT> 5 5
    6 6 5 5 5 5
    6 6 5 5 5 5
    6 6 5 5 5 5
    

    In this example, the random test ist expecting only 1 field with maximum depth of 3 (indizes: 2, 3, starting from upper left corner). My code return 2 fields. As far as I understood the description, it should be 2. Can someone help pls?

  • Default User Avatar
  • Default User Avatar

    Test keeps telling: arrays first differed at element [0]; expected:<55> but was:<1836311903>
    It works correct on my machine.
    Any ideas? (java)

  • Custom User Avatar

    Please use spoiler flag next time.

  • Default User Avatar

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

  • Default User Avatar

    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.

  • Default User Avatar

    Yeah, thats true. I was considering "Strings with one word do not need gaps ('somelongword\n')." In this case the word has the same length as the width then.

  • Custom User Avatar

    This is an invalid input according to the description and I also cannot see any test like this in C#. There are only

    Justify("", 2);
    Justify(null, 123);
    
  • Loading more items...