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.
( See issue below for context )
The reference solution apparently expects
round(dx)
, and notround(oldX) - round(newX)
.That would expect a wrong answer in a situation like
move from ( 0.4, 0 ) to ( 0.8, 0 )
, where I would definitely expect a length1
line to be drawn.I have a solution that produces visually indistinguisable results from the expected ones. But some values are off by one.
There are endless possibilities for floating point representation errors in this kata. Unless you specify exactly how to convert from degrees to radians, and when and how to round values that go into the SVG, the onus is on you to compare actual to expected values with a margin for error. Rounding is not an exact science.
I say "how to round values" because there may even be a difference between
round(dx)
andround(newX) - round(oldX)
. ( The latter is probably more correct, but I have no way of knowing if that is (a) the full problem with my solution and (b) what the reference solution actually does. )Using floating point values ( even intermediate ones ) in a kata is a can of worms that you have to be prepared for, and handle fully. The only right way to do it is comparing with an error margin, the wrong, wrong, wrong way is rounding final values. If you want to do it the wrong way, be prepared to specify full computations, in order, because solvers are not mind readers and we just don't know against what order of calculation we will be tested. Specifying full computations is, of course, less than ideal, because there's not a whole lot of kata left afterwards.
Is it actually possible we get the verbose variant as input, or will we always just get the string?
should be
"Minor..."
. And you should use separated bullet points for that part of the description, to make the info easier to catch.Note: iirc, you just created a duplicate of a python kata... I'll see if I can find it again (couldn't find it easily. Maybe the one I'm thinking about has been retired...? Someone?)
Please lose the input validation.
Does it guaranteed not to contains cases with multiple
III
orUU
sub sequences.Or how many applications do it take to process on two or more same sequences? Like