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.
Removed test with
nullptr
root.same here
Duplicate issue.
This comment is hidden because it contains spoiler information about the solution
C++ random test segfaults, but maybe you can submit your answer as C. Solution should be similar and C test doesn't segfaults.
The C++ kata has been solved not once, but 209 times.
That is the code stub for the solution of the kata. Notice the firstAttacker (string) parameter.
declareWinner is the function
fighter1 and fighter2 are Fighter isntances
"Harry" is the firstAttacker
I'm not actually C++ programmer, but I cannot see a mistake in the code, only in your text and understanding of the kata.
No, they are not the same. In the description example, the firstAttacker is "Lew" while in BasicTest2 it is "Harry".
Who attacks first, in this case, changes the outcome.
Your work above where you manually solve the problem is wrong. You start with "Lew(10) attacks Harry(5) with 2; Harry has now 3" when Harry attacks first. This changes the outcome.