7 kyu
Ninja vs Samurai: Strike
3,144 of 5,706jhoffner
Loading description...
Debugging
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
JavaScript:
The "Submit" button (Python) gives an error: AttributeError: 'Warrior' object has no attribute 'strike'
that's because of indentation / scope
in your code
Thanks, I didn't realize that basic test doesn't even call this function.
Scala translation
This comment has been hidden.
Random tests added in Ruby, done in this fork
python new test frame work
Approved
it's not working when i click 'run tests', but clicking on 'submit' its success. in javascript.
that's because there are no sample tests in JavaScript, re-raising
In Javascript, the tests do not allow for "private" variables (such as using a _ or #) so nobody can unintentionally alter the class. Seems suitable to add to a 7kyu. This one was pretty fun though!
JS translation does not have fixed tests
Typescript Translation Kumited! Please Accept :D
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
it's no working, when i click 'run tests', but click 'submit' is success. in javascript.
Very nice, seems easy at first, but then you try to find what is not working
This comment has been hidden.
You can upvote this kata by choosing
Very
in the satisfaction rating.This is incorrect in the python description. ninja = Warrior.new('Ninja') samurai = Warrior.new('Samurai')
There is no .new method in python
This is the correct way to create an object in python ninja = Warrior('Ninja') samurai = Warrior('Samurai')
Fixed
Ruby and Python versions submitted :)
Missing ; on first 2 lines.
Impressive quantity of different valid solutions on this one! I could guess not more than 4.