Ad
  • Custom User Avatar

    In my opinion providing assertion messages has nothing to do with the rank of the kata and everything to do with the user experience. Having to print the input is tedious and clunky, whether the kata is 8-kyu or 1-kyu. Providing it in assertion messages is always good and should not be reserved to easy kata.

    added to this one.

  • Custom User Avatar
    • there were no assertion messages, so you were likely misled by your own logging
    • removed that requirement and passed a copy to the user
  • Custom User Avatar

    Well, yeah, I do not see why composite types of inputs should be any special. 5 kyu challenges are relatively advanced, not easier than printing an object graph, and I'd assume that if someone attempts a 5 kyu, they are already on the level of "print a tree" or "traverse a graph" kind of task.

    I would personally draw the line at 6 kyu tho rather than white/yellow, but it's just me.

  • Custom User Avatar

    (to Johan) For a kata with operations on numbers/strings, sure. But for data structures, would you really think so (especially given that this kata in particular seems to be bugged)?

  • Custom User Avatar

    For a 5kyu, solvers can debug print their inputs. White kata should show inputs on failure, but the obligation should end there.

    Other opinions may be available.

  • Custom User Avatar

    Because it was not a common authoring practice at the time the kata was authored. Back then, not many authors included this information in test output.

  • Custom User Avatar
    • Why no debug information in case of tests failing?
  • Custom User Avatar

    Pretty classic Kata)

  • Custom User Avatar
    • Coordinate system of error message and that of the matrix are not the same (wery wery confusing!)
    • Why aren't we allowed to mutate the input, isn't it better to provide a copy to the user function instead?
  • Custom User Avatar

    ah F me, the coordinate system is upside down, but error feedback uses regular coordinate system :/ :/ :/

  • Custom User Avatar

    How do you explain this case?
    Specially, given:

    If the starting point isn't completely surrounded by ones at the beginning, return a grid full of ones, as shown below

    arrays first differed at element [0][0]; expected:<0> but was:<1>
    
    0 0 0 0 0 0 0 0 0 0 0 0
    0 0 0 0 0 0 0 0 0 0 0 0
    0 0 X 0 0 0 1 1 1 1 1 0
    0 1 1 1 0 0 1 0 0 0 1 0
    0 1 0 1 1 1 1 0 0 0 1 0
    0 1 0 0 0 0 0 0 0 0 1 0
    0 1 0 0 0 0 0 0 0 1 1 0
    0 1 0 0 0 0 0 0 0 1 0 0
    0 1 1 1 1 1 1 1 1 1 0 0
    0 0 0 0 0 0 0 0 0 0 0 0
    
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1 1
    
  • Custom User Avatar

    please help me. How to access X and Y coordinates. I can't find the names of the variables or the method by which I can access the variables of the point object.Was it difficult to just specify 2 variables x and y?

  • Custom User Avatar

    I'm currently in the same boat with java. Makes me wonder if theres an issue with the java test-checker.

  • Custom User Avatar

    Language is Java BTW. I'm having some trouble with the random tests and I can't see what I'm doing wrong. The smallest test I've seen that I fail has no rollbacks and is just simple moves. It can be recreated with

    Go g = new Go(5, 7);
    String[] moves = new String[] { "4B", "3E", "3C", "1E", "4F", "2G", "3D", "2E", "4A", "3B", "4G", "1A", "3E",
    			"2A", "2B", "3B", "3B", "1F", "1E", "2A", "3D", "3E", "4D", "1A", "4A", "3A", "1A", "1C", "3F", "4F",
    			"1A", "3D", "3F", "3B", "4A", "1C", "2C", "1B", "3F", "2B", "2C", "1A", "1D", "2A", "1B", "4E", "1A",
    			"2G", "3A", "2A", "4D", "2A", "1B", "1E", "3B", "1D", "1E", "1E" };
    for (String s : moves) {
    	try {
    		g.move(s);
    	} catch (IllegalArgumentException e) {
    	}
    }
    

    What I end up with is

      A B C D E F G 
    5 . . . . . . . 
    4 x x . o o x x 
    3 x o x x o x . 
    2 x o . . o . o 
    1 x x o o o x . 
    

    and while I can't see what it should be, I'm getting the error

    arrays first differed at element [1][4]; expected:<x> but was:<o>
    

    element[1][4] is "4E" which is only set once and, according to my program, it is set by white. Can anyone that has completed this tell me what this move set should result in? I can complete every other test and most of the time I can complete 30+ random tests, but no matter how many times I try I can't complete this thing.

  • Custom User Avatar

    Hello @Tonio31

    Using the input you provided I think the result should be [0, 1, 2, 3, 4, 3, 2, 1, 0, 2, 4, 0]

    Maybe you found a problem.

    What language are you using?

  • Loading more items...