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.
The example in the text is wrong it should state get_hud([7,7], [3,2], [5,6,7]) instead of getHUD([7,7], [2,3], [5,6,7]), for tue characters displayed.
made some changes, description is still typescript specific though
It is especially important to include sample tests with even sizes. And it should be better explained in the description. For example, if the width is
4
then the correct position is1
(not2
). The center is2
but the digit position is2 - 0.5 = 1.5
which is rounded down to1
.Description should be language-agnostic
Example and sample tests should provide a test when row size is even length to comfront to the following requirement
The parameter name
screen_size
should bescreenSize
fixed
it shouldn't be stated, it's a
puzzle
width
andheight
can be1
which makes numbers overlap, and it is not stated in which order they should be "rendered".Actual/expected values are flipped in sample tests and their copy in the final tests.
Good catch
By the way, you should also calculate
test
and the error message beforesample
so users mutating the input array (for whatever reasons) won't affect the test results.fixed
Well, if the tests are random we can't pattern match the results (they'd also be random assuming test inputs are strong) anyway, so good feedback becomes much more important.
I didn't realize the non-sample tests were supposed to have descriptive errors. I was under the impression that to avoid pattern matching failed tests wouldn't provide detailed reports.
fixed
That's... not very helpful.
Loading more items...