• Custom User Avatar

    Marking this as resolved since I didn't receive a reply.

  • Custom User Avatar

    Thanks for letting me know. The test cases have been updated to work with Python 3.6 and Ruby 3.0

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Could you give an example?

  • Custom User Avatar
  • Custom User Avatar

    Yeah, you're right about the verticals & diagonals, but I guess it could work by assuming that the letters of the train proceed along the track in whatever the positive x/y direction is. Maybe nobody else even made this mistake!

    Edit: Ah, fair enough. I missed that detail!

  • Custom User Avatar

    This should probably be a five kyu.

  • Custom User Avatar

    Right, what I didn't get from the instructions is that the direction is only a function of the string representation of the train, and not a function of the string representation plus the train position.

    If I say, "You can tell which way the train is going based on its engine" and then give you the position, you can imagine different scenarios like this:

    Train "aaaA" at position 6

    /--aaaA--\
    |        |
    \--------/
    

    Train "aaaA" at position 14

    /--------\
    |        |
    \--aaaA--/
    

    What you're meant to assume (it's not stated explicitly) is that the string representation of the train is how it would be laid out at the zero-position, and then you can imagine it running around the track to arrive at its orientation at the given starting point (in example two this would lead to a reversed train of Aaaa). What I was imagining was that the train would be laid out visually, according to the string, AT its starting point. In that case it would require another step of figuring out how the train is pointed based on where on the track it is, and make the kata slightly more difficult.

  • Custom User Avatar

    I really enjoyed this kata, thank you!

    One minor suggestion, and a part that I got stuck on for a few minutes:

    When determining the train's direction on the track (positive or negative), knowing whether the first or last character is a capital letter is enough.
    This is fine, but it was a little counterintuitive to me since if you know the position and the visual orientation of the train, it could be going in either the positive or negative direction, depending which part of the loop it's laid out on...

    If that's not clear, imagine a simple square-shaped loop. If my train aaaaA is on the top part of the loop, visually it's going forwards. If it's on the bottom part of the loop, it's visually going backwards. It's a litte weirder for the sides, but the same idea applies.

    Not a big deal, but I thought I'd mention it in case it makes the instructions clearer for anyone else!

  • Custom User Avatar

    I don't mind this style of Kata (as I commented on the previous one in the series, Car #2). However, this one has a very poor description, many hidden assumptions, and at least one test case that's inexplicable to several users (See boy1255's comment about AverageConsumptionsAfterBraking below).

    Since the author hasn't responded to this in years, and has indeed deleted his account... I would say that this kata should be retired.

    The other two in the series aren't so bad. They might be worth keeping.

  • Custom User Avatar
  • Custom User Avatar

    Even though there are hidden details in the tests which must be puzzled out, they're all fairly logical. I wouldn't want every kata to be like this, but I think this one is a great change of pace. I'd like to see more OO implementation katas!

  • Custom User Avatar

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

  • Custom User Avatar

    Like some of the other commenters, I was also thrown for a loop regarding how iterations of jump symbols are counted.

    It should be made more explicit in the instructions:

    • Encountering a [ always counts as an iteration (whether or not it causes a jump)
    • Encountering a ] only counts as an iteration if it causes a jump
  • Loading more items...