7 kyu
Ninja vs Samurai: Strike
1,459 of 5,704jhoffner
Description:
Something is wrong with our Warrior class. The strike method does not work correctly. The following shows an example of this code being used:
ninja = Warrior('Ninja')
samurai = Warrior('Samurai')
samurai.strike(ninja, 3)
# ninja.health should == 70
Can you figure out what is wrong?
Debugging
Similar Kata:
Stats:
Created | Apr 26, 2013 |
Published | Apr 27, 2013 |
Warriors Trained | 9465 |
Total Skips | 410 |
Total Code Submissions | 22564 |
Total Times Completed | 5704 |
JavaScript Completions | 3143 |
CoffeeScript Completions | 243 |
Python Completions | 1459 |
Ruby Completions | 312 |
C# Completions | 607 |
TypeScript Completions | 225 |
Total Stars | 73 |
% of votes with a positive feedback rating | 84% of 677 |
Total "Very Satisfied" Votes | 510 |
Total "Somewhat Satisfied" Votes | 123 |
Total "Not Satisfied" Votes | 44 |