Beta
The 8 Elements Of Spells
Loading description...
Puzzles
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.
The instructions say "Each element has a unique energy requirement." but Shadow and Light are listed as having identical energy requirements. I suggest you delete the quoted line from the instructions unless you have a solution in mind, too clever for me, that relies on it's truth in which case please make it true.
Comparing floating point by adding an absolute epsilon to one side makes no sense at all.
If everything always have at most 1 decimal place, either represent it as
int
10 times the actual value, or useDecimal
. Deal with the floating point errors correctly.Definitely deserves to be an official kata :D
tests are now wrong:
this should ofc be true!
And your internal solution is wrong too: you have to use
>=
not>
(even if it's unlikely that it does a difference), and the test for negative values will not take into account the EPSILON, so this is not good too.since you use non integer values, you should add specific checks for floating point errors, to be sure that it's hendled correctly. For that, you'll have to provide the EPSILON you wanna the warrior to use.
Now states EPSILON for user to use in comparison. Also Added Epsilon in Solution Checker and Maker.
The description of the problem is incomplete: you provide wrong inputs too, but you do not tell what you expect in those cases.
Added Rule "7. If a spell is cast with an incorrect formula (example: W3T5) it will not cast."
and what about the floating point troubles? Because currently, my solution does not what you expect and it systematically passes the tests.
This comment has been hidden.