I see that the problem appears after a level is increased, but I don't know the reason. In my version I have a sum var, which is the sum of the values in the array (I'm adding new values in the for cycle where I compute the points). If the sum is greater than or equal to ten, I subtract ten from it and increase the level variable by one.
I don’t see your code, so I can’t say what’s wrong. But if you provide an example, then I can describe it in details.
The most common mistakes:
I see that the problem appears after a level is increased, but I don't know the reason. In my version I have a sum var, which is the sum of the values in the array (I'm adding new values in the for cycle where I compute the points). If the sum is greater than or equal to ten, I subtract ten from it and increase the level variable by one.
Follow the example and find the mistake by yourself. Write, please, if it doesn’t help.
for input
[2, 0, 2, 4, 4, 0, 4, 3, 0, 0, 0, 1, 0, 0, 2, 4, 0, 1, 3, 4, 2, 0, 2, 1, 4, 2, 0, 0, 1, 3, 1, 4, 4]
That.
Not a kata issue.