5 kyu
The Solar System - Planets on the Move
57 of 58shreedave
Loading description...
Lists
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Lua translation!
Approved!
Hi,
Missing fixed/sample test: what is the expected value for this?
earth> venus <<mercury
-> I suppose it's["mercury"]
?jupiter> asteroid earth> <mercury <saturn
->jupiter saturn
["Earth>", "Venus", "<<Mercury"]
should return[]
because"Earth"
smashes"Venus"
,"Mercury"
smashes"Earth"
and then goes out of orbit.["Jupiter>", "Asteroid", "Earth>", "<Mercury", "<Saturn"]
should return["Jupiter", "Saturn"]
, do you want me to add it in the fixed tests?Yes, that's why I opened this as an issue. But wait, because those two outputs are logically inconsistent, or the specs arean't clear:
If the first ends up empty, this means the original positions actually do not matter, otherwise, mercury would stay inside the solar system:
If M actually goes out, there is no rule justifying/explaining it, afaik.
In any case, I really think the way the example is explained should be changed, using something like my example above, to make clear what the reasonning is.
I'm adding it as another example.
I added the new example (with some more things in it but taking care of the scenario) and added it in the fixed tests and the sample tests.
Awaiting approval, assessed ranks
approved!
Thank you!
This comment has been hidden.
Fixed it.
Spec solution appears incorrect:
Input:
['Blackhole', 'Jupiter>', 'Uranus>>>>', 'Asteroid>', '<<<Earth', 'Venus>>', '<Asteroid', '<<<<Mercury', '<<<<Asteroid', 'Saturn>>>>']
Output:['Blackhole', 'Jupiter'] should equal ['Blackhole', 'Jupiter', 'Saturn']
If I'm understanding correctly, Saturn should have left the system.
Similar issues here:
Mercury should have gone out of orbit
Uranus should have gone out of orbit
All of these, (Saturn, Mercury and Uranus), were being ignored, but I fixed it.
This is quite the co(s)mic pair.
Blackholes, once in the Solar System, will never leave.
In most of the random test cases,
"Uranus"
is very lucky, and almost always survives!