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

    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,
            };
    
  • Default User Avatar
  • 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)

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

  • Default User Avatar

    Somewhere in your justified text there is probably something different to what is expected...

  • Default User Avatar

    There is a test missing, which covers the rule with long words (bigger than width)

  • Default User Avatar

    Stack is synchronized, which is not needed here. Use Deque instead.