Ad
  • Custom User Avatar

    «If the goalkeeper is at position 0 and the ball is to the left of the goalkeeper, the goalkeeper should remain at position 0. Similarly, if the goalkeeper is at position 10 and the ball is to the right of the goalkeeper, the goalkeeper should remain at position 10.»

    Such cases don't ever get proposed by tests.

  • Custom User Avatar
    • Description should be language-agnostic

    • No random tests

    • We already have tons of conditional statement based katas such as 1 and more...

  • Custom User Avatar
    • The random tests should be done with a loop, to do more than just 1 of them.
    • duplicate of too many kata (you shouldn't republish it, but you can definitely poke at the fixes, to see how to handle the different problems)

    • why the limitation to non empty arrays? This is just giving bad habits to users (and it's not even a special case, if the function is coded in a reasonable way)

    Cheers

  • Custom User Avatar

    Changing the user's function definition to const:

    SyntaxError: Identifier 'calculateScore' has already been declared
    

    'Means the overall setup is wrong (and explain why anything is passing: you're testing the ref solution against itself)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution