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.
Language: C++
Test suit missing the required header
std::string
.the picture is gone (
<img alt="pong" src="http://gifimage.net/wp-content/uploads/2017/08/pong-gif-3.gif">
)How is such a mistake even possible:
Expected: "Player 1 has hit the ball!"
But was: "Player 2 has hit the ball!"?
I passed the test task but further...
Rust translation
Hi
I would suggest that the description "Your xp does not reset on a level up. So for instance, if our xp required is 10 and a boar gives 15xp. Then we would level up and also have 5 xp on the next level." be updated as to me it seems like the xp does get reset, else you'd have 15xp after killing that boar and not 5xp!
I think what you mean to say is excess xp over and above that required to increase a level is carried forward to the next level and not lost?
Thanks :)
Please take all this with a pinch of salt. This is simply how I would do it if I were making this kata, based on how I think would be easiest for people to read and understand. But it's all up to you. Take it as is, use ideas from it, ignore my suggestions altogether... it's your choice.
I think the main issue with comprehension is the way the arguments are setup. First, it's hard to understand from their names what they refer to. There is no "max level" as such; it just the target you need to reach. Your XP is not changed in any way linked to
changeInXp
. And what isrequiredXp
required for?(And, just something that rubbed me the wrong way, but "XP" is always all-caps as far as I know. And it doesn't seem to harm readability for those variables to have it all-caps, either.)
Their order also seems strange. For example, you'll start at a certain level. But that level isn't defined first; it's somewhere in the middle for some reason. So when you explain how things work, you're introducing the variables in one order... then when you're presented with the arguments you'll actually use, it's in a different order--meaning you need to work out yourself which arguments link with which steps in the process.
I would change the arguments into something like:
(currentLevel, maxLevel, levelCost, costIncrease, boarXP)
Though it should reflect whatever the explanation is, so it depends on what you settle on.Speeling errors: "dont", "freelancers", "depending", "dont" again.
Markup could be improved slightly (
workNeeded
, inconsistentminutes
case ), and personally, I don't like stringified answers ( they add absolutely nothing in this case. just return a tuple. don't know how well this works for C++ though ).Not rating just yet; if nobody comes up with an actual duplicate that issue is moo, otherwise, it should not have been closed just yet.