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.
Not sure why this was marked as 'best partices'. Regex is quite slow and shouldn't be used for such easy tasks.
drawPossible
expects different results in sample tests and actual tests.Why does
draw
require trailing line break whendrawPossible
doesn't?In fact, what is the actual requirement? You didn't explain anything except providing an "example" that you didn't explain how does it relate to the kata, so it might as well be irrelevant. In other words, you kata has no functional specs.
What is
drawPossible
supposed to do? Why does it expected a different, fixed string?width
?height
? Also note that width should be multiple of25
, not5
.Initial code parameter
h
andw
are flipped.5
and stretch the sample text by that amount ( scaling the pixels ) ?Keep in mind that expected values are useless to see the expected result - newlines are printed as
'\n'
.