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.
Alright... after switching things the wrong way i've switched them right :)
Due to this :
In error messages, the actual and expected are swapped.
:D
Thanks for pointing that out... fixed it.
In full test suite:
When I am checking all possible paths then sometimes I have got a little better result than in tests.
Are the test correct for sure?
Although my comment above focuses on the negative, personally, I think that this is a good kata because it gives a real-world situation for doing the dot product. There are many ways to do a dot product, so it gives us practice thinking about it.
As it is, some people are challenged not by the underlying problem itself, but by the description of the problem. I like that example, @Chrono79, and think that it could strengthen the description.
Alternately, you could just write it out in words.
[0 0 0 0 0 1] means that Good has one Wizard. One Wizard is worth 10, so Good's total army is worth 10. [0 0 0 1 1 1 0] for Evil means that there is 1 Goblin, 1 Uruk Hai and 1 Troll. A Goblin is worth 2, Uruk Hai 3 and a Troll is 5, so Evil's army is worth 10. The result of this battle is a tie!
That should cover the common error, but if a test was added in the sample tests it would be fine by me. Or adding this example to the description:
10 = 10 therefore it is a draw
Maybe it's just "Evil", not bad!
a bad kata!!!
This comment is hidden because it contains spoiler information about the solution
The tests, as they currently stand, need serious rewriting:
Test.expect
should be changed toTest.assertEquals
to see what our function has returned(Also, if anyone wants to raise another issue about test cases being wrong, don't do it unless you can show why. Otherwise they're bogus and just noise.)
Not an issue
Not an issue
Loading more items...