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.
This comment is hidden because it contains spoiler information about the solution
Nice idea, like it.
But I have a problem with the test examples. E.g. the first test example. When I follow the rules, car scores 5 points when moving line up, then another 5 moving line up, the car passes object, so add 8, then passes 2 objects, so add 11, next three lines of 5 points (15 points), then a car is passed (the car that originally started at line 7) giving me 7 points, and then I crash to the object at line 3. Counting 5 + 5 + 8 + 11 + 15 + 7 = 51 points. But you expect 52 points. Can you help me what I miss in the rules?
It's still failing random tests in php
I tried to make description more clear and added random test.
I'll mark this resolved now. If it's not ok, please let me know :)
Thanks!
Thanks. RR and LL are added now to test both car and obstacle. Soon I'll create random test and improve description.
Just looking at my code. None of the test check if you hit an obstacle or car on the same row. For example if the move is "RR" and it hits something. My code doesnt handle this and passes all the tests
I get it now. Ok, thanks for help :)
Easiest way is to create some random roads and moves, then use your code as an answer reference.
Many details, it's not easy to explain. If you have any suggestions about description, please let me know.
I don't know how those random tests are written. But maybe I can check in my solved katas how's that done and make those.
Great kata though :-)
I guess I can mark this resolved
Sure, I'll post all that, but just one thing: we know the fact that other cars are moving twice slower and we know the fact that passed means one step behind. I really want to make it clear, but I want people to think through it. I didn't want to tell them "Hey, what if that other car moves in the same step you are passing it, so you stay in the same line? Did you foresee that catch, hm?"
In that case, you should state in the description:
Option 1
)After that the issue can be closed.
It makes more sense now, but still not clear:
X
stands for the player's position)Loading more items...