Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Marking this as resolved since I didn't receive a reply.
Thanks for letting me know. The test cases have been updated to work with Python 3.6 and Ruby 3.0
Fixed.
Fixed.
Could you give an example?
Fixed.
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!
This should probably be a five kyu.
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
Train "aaaA" at position 14
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.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!
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.
test
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!
This comment is hidden because it contains spoiler information about the solution
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:
[
always counts as an iteration (whether or not it causes a jump)]
only counts as an iteration if it causes a jumpLoading more items...