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.
very wonderfull drawing, I felt positive making this kata, tnx
Impressive first time kata Tiarama - fun too!
I changed the exceptional case return value to -1
Thanks for the comments, I'm learning a lot
IMHO throwing an error is better than returning some arbitrary value.
-1
orthrowing error
is better,null
is worse (because, it is still multiple output types, and such code removes type hints from IDE, if you're using any).Returning
0
in the exceptional case is a bad idea - that value can also result from an inexceptional case ((0,0)
).-1
would be a better idea. Or throwing anError
. Or returningnull
( an empty value ), though not everyone will agree with that.I've implemented all of this now - This is my first kata so sorry for the messiness and thanks for the feedback!
yes and no:
I think I've solved it, thanks for the feedback!
Note that your solution is wrong. The tests are bad.
Ahh okay, ace thank you!
Test.assertEquals(XO('xxxoo'),false);
You're confusing the logs, they appear above the test result.My code is passing all the attempts except for the 4th one down.
console.log reveals str to be 'xxxoo', but it is expecting the result to be true.
Am I missing something?
Loading more items...