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.
Why fightResolve('A', 'a') must return 'a' in test cases? The description says: "If a matchup occurs that was not previously mentioned (for example Archers vs Pikemen) the attacker will always win." So attacker is first argument, 'A' in this case. Or did I miss something?
Yes, you only have to apply string manipulation and if statements.
This is really considered in the level of the second-easiest katas?
Tests =)
Expected: undefined, instead got: 'A'
Clojure translation for review:
https://www.codewars.com/kumite/5fb977fdf8ed8d0026e066d0?sel=5fb977fdf8ed8d0026e066d0
The order of the function parameters is fine. I updated one paragraph to match the function specifications (see below), but I don't think the ordering elsewhere needs to change.
Reversed order in that paragraph to match the specifics of the function. Didn't change the ordering anywhere else.
Replaced instances of calvary with knight.
Added random tests to C and NASM.
Your battle resolution matrix is confusing. Put the column and row headers in the same order, and better clarify that it's a defenders vs attackers matrix.
Also, your parameters are out of order. You say it takes attacking and defending pieces, but the function takes defending and attacking pieces (which again, makes the resolution matrix confusing because you have it structured as defending vs attacking)
Actually, it takes defending and attacking pieces (in that order)
Added random tests to C++; same algorithm as Java. Will wait a few days to see if there are any issues before updating C and NASM.
Java translation available. Please review.
C, C++, and NASM versions need randomized tests.
Loading more items...