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.
Instead of 'break', you should use 'continue'.
I just added clarification to the description. Hopefully it will help people understand the objective of the kata.
@isimon I thought this was really a good Kata but lots of people seem to struggle to understand it, and now the "satisfaction" rating is suffering because they are voting it down. Please consider some of the suggestions for improving the description so it gets the rating it deserved!
@dinglemouse
Thanks for the explanation. I noticed the sections rule but couldn't figure out what the purpose was, as it isn't clear from the examples what the significance is or what a day is in terms of the array.
To be more clear the description should say something along the lines of:
morning
,afternoon
, andevening
(every 3 values in the array is a full day)" - then followed by the other rules, perhaps nicely formatted.rains
or there is athunderstorm
he takes his umbrella out of his backpack and when it stops raining he puts it back.Agreed. The type should either be Int or Integer, depending on how big the tests get. It uses int in C, C++, C#, and Java.
This is a very good kata for beginners.
RTFM
and
So (your first example)...
Day 1
rainy
-0+1=1
rainy
- do nothing (he already has the umbrella out)thunderstorm
- do nothing (he already has the umbrella out)Day 2
rainy
-1+1=2
rainy
- do nothing (he already has the umbrella out)cloudy
- put umbrella back in packresult = 2, expected = 2.
QED
Thanks bdupau.
@isimon even if he needs the umbrella during a thunderstorm, the examples are still unclear(to me at least):
First example:
rainy - OUT (1)
rainy - DO NOTHING
thunderstorm - DO NOTHING
rainy - DO NOTHING
rainy - DO NOTHING
cloudy - IN
= 1, expected 2
Even if lets say he puts it back at the end of a thunderstorm no matter what, it still doesn't work for test cases.
4th sample test:
rainy - OUT (1)
cloudy - IN
thunderstorm - OUT IN (2)
sunny - DO NOTHING
cloudy - DO NOTHING
rainy - OUT (3)
rainy - DO NOTHING (3)
cloudy - IN
sunny - DO NOTHING
= 3, expected 4.
Maybe I'm missing something, but I don't see how this can work from what we have.
Yes. I'll add that to the description.
So does a thunderstorm require the ranger to take out his umbrella? It's unclear from the two examples.
This is a good kata for beginners.
Yeah, my bad. For some reason I thought that you couldn't change the comment type.
Anyway, the only reason you had an immediate response was because you marked your comment as an issue instead of a question, which it should have been.
You make the kata author lose points if you mark it as an issue. If you had just re-read the description, you would have known what you were doing.
It's not BS. I did change the comment type. Didn't have to delete it. Stop talking sh** about me. And you have to be very patient to get an answer to a question. Issue gets almost immediate response. But, I hear you, I'll use question next time and just wait around. Sigh.
Loading more items...