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

    Why this kata could be positive as training and could / should be approved:

    1️⃣ Skill Improvement: This kata offers an excellent opportunity to improve programming and logic skills. It challenges you to implement the logic of the goalkeeper's movement in a soccer game, which will help you strengthen your problem-solving abilities.

    2️⃣ Practical Application: The challenge is based on a real situation in a soccer video game. Passing this kata will allow you to understand and apply the concepts of goalkeeper movement in a practical context.

    3️⃣ Clear conditions: The statement provides clear and specific rules for the movement of the goalkeeper in relation to the position of the ball. This allows you to have a clear and defined goal when implementing the feature.

    4️⃣ Linear scale: The kata is based on a linear scale where the position of the goalkeeper and the ball are represented by numbers. This provides a simple and understandable context to address the challenge.

    5️⃣ Rust programming language: The kata is designed to be solved in the Rust programming language. Passing it will allow you to practice and improve your skills in this particular language, which is valuable in the field of programming.

    Tests. It has tests. It is indeed a very useful point.

  • Custom User Avatar

    I have added random tests.

    Ill look to add something else to it regarding the conditial statments. Just starting to get to grips with how to create them.

  • 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

    Looks better, but you'll have to republish the kata to move it out of draft.

  • 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)

  • Custom User Avatar

    no JS version anymore.

  • Default User Avatar

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

  • Custom User Avatar

    Should all be done add right now ;-)

  • Custom User Avatar

    @B4B: nah, the initial Rust solution is the same one you see in the description.

    @author: ok, but then you need to change the title of kata, and also modify the description a bit ;-)

  • Custom User Avatar

    No it is ok i get him the scenario is bug fixing but the problem is not bug fixing, changed to fundamentals. And the blank javascript i am not sure why it is even there

  • Custom User Avatar

    Talking about JS, I bet? (see below)

  • Custom User Avatar

    However, there are some bugs in the code that need fixing

    The initial code is an empty function! That's not "bug fixing".

  • Custom User Avatar

    Hi,

    is the JS version intended? Because I see only rust code in the description.

    Cheers

    edit: I bet it's the dummy language version problem again => unpublishing, just in case

  • Loading more items...