Ad
  • Custom User Avatar

    If x and/or y are out of range, the sprite should stop at the edge.

  • Custom User Avatar

    I agree with all of the above comments. In addition, I have the following suggestions. First, your solution's template sets self.costume_now equal to 0, implying that indexing of the self.custum list is zero based. The switch_costume_to method expects the list index to be one based. This should be explicitly stated. It should also be stated that the switch_costume_to method's arguments provide relative changes to the current x and y locations. Finally it should be explictly stated that the rows in the "place" list are numbered from the bottom of the "place" matrix to the top.

  • Custom User Avatar

    I have not used Scratch before, I have no idea what it is, and when I click that link, I get a completely overwhelming screen that does not explain what Scratch is, does, or wants.

    "block" and "sprite" are not terms you can use without defining them.

    Generally, a description should be self-contained. Links to outside resources do not replace concise definitions of terms that cannot be assumed to be known. ( That's not to say an outside link is never useful. )

    So "Scratch", "block" and "sprite" should be explained in the description.

  • Custom User Avatar

    go_to: A function that takes two parameters and is used to move the sprite to the position (x, y).

    Absolute or relative?

    What to do if x and/or y are out of range?

  • Custom User Avatar
    AttributeError: 'Sprite' object has no attribute 'place'
    ...
    AttributeError: 'Sprite' object has no attribute 'costume'
    

    Why tests try to access these undocumented attributes? And why Sprite should have them?

    There should be a well documented interface and the tests should test the interface without accessing implementation details.

  • Custom User Avatar

    I've improved the description of the kata.
    Thanks for your suggestion.

  • Custom User Avatar

    The description should describe the task.

  • Custom User Avatar

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

  • Custom User Avatar
    • Resolved description MC

    • Scrutinized tests

    • Added useful assertion messages

    • Removed reference solution and modified to be differed from OP's solution

    • Updated to Kotlin 1.9

    • Added annotations

    • Modified random test generation to follow Crystal version

  • Custom User Avatar
    • Scrutinized tests

    • Added useful assertion messages

    • Removed reference solution

  • Custom User Avatar

    Random test assertion message substitutes the wrong value: Should be equal to xxx has the input rather than the expected value.

    Also, some parts of the random test input range do not make sense: at height like 218cm the "height needed to jump" becomes negative, when it really should be 0.

  • Custom User Avatar

    There are absolutely no information that can help deduce the formula, except a whole bunch of inputs and expected values generated by the random tests.

    This is not a "puzzle", this is just blindly fitting data to get a formula. And not a good one at it either, if it is just a linear relationship.

  • Custom User Avatar

    I just did, so it's doable.

    But I hate this kinds of kata. It's 7/8kyu that was made 6kyu via adding some artificial constrains.

  • Custom User Avatar

    I am going to reject this, since this kata has a heavy JS-specific focus. While Python has a very similar feature, I don't think its a good idea for a beginner Python solver to stumble upon a 8kyu kata, and be told to "Find out what is new in ES6" in order to solve it in Python.

  • Custom User Avatar

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

  • Loading more items...