Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • 31668662?v=4

    My solution involves finding all of the integral points along the line between start and target, moving "diagonally" as mentioned in the description

    If you can't pass the tests, then you're "moving diagonally" incorrectly.

  • Profile pic

    The description seems vague. My solution involves finding all of the integral points along the line between start and target, moving "diagonally" as mentioned in the description. However, reading a prior issue with (3,2), (4,5), it seems there is a limit the max length of each diagonals. Please update the max length, are diagonals limited to 2^.5 ?

    Thanks!

  • 31668662?v=4
  • 33926906?v=4

    New to ruby, is that forbidden? Weird that it makes the random tests fail but not the others.

  • 31668662?v=4

    Ruby version is working correctly. And you're most probably mutating the input.

  • 33926906?v=4

    Ruby random tests verification uses the same value for target and start. But the function is fed different values (Same issue reported by @sergeyn 3 years ago).

    Rand test 1
    start = [7, 7]
    target = [0, 5]

    wrong route from [0, 5] to [0, 5] - Expected: [[0, 5]], instead got: [[7, 7], [6, 6], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5], [0, 5]]

  • Profile pic

    Looks good.

  • 31668662?v=4

    @Unnamed, the description was updated. Can this issue be closed, or is it not clear enough yet?

  • 32236948?v=4

    Note: you should move diagonally until the path from your current position to the target cannot be represented as fully horizontal/vertical line.

  • 31668662?v=4

    I've modified the description yesterday (while writing the translation) clarifying this point, but all the changes are missing O_o

    Edit: the last revision was 2 months ago, so the update never happened for some reason...


    The description should be updated with the info from here.

  • 32236948?v=4

    For x and y, you "tick" by one at each step until you reach the max value on that axe, then you keep it constant. meaning you cannot have multiple times the same value unless it's the final one. It's obscur, yes, but I honestly already encountered worse about the descriptions, without any issue raised.

    so, we resolve?

  • Profile pic

    The expected behavior for the case with multiple shortest routes is unspecified.

    @Blind4Basics 'NOTE: x should "tick towards" target_x indepedently of y. Same with y.' doesn't really mean anything. Of course they are independent, but how does it help to choose between [[3,2],[4,3],[4,4],[4,5]] and [[3,2],[3,3],[3,4],[4,5]]?

  • 31668662?v=4
  • 31668662?v=4

    Python translation. Please, review and approve (the author is inactive).

  • 31668662?v=4

    The fact that you can move diagonally doesn't mean that you have to. Also, duplicate issue.

  • Loading more items...