Ad
  • Custom User Avatar

    Hi!
    Glad you found it useful, I temporarily closed the kata in order to edit it, now you should be able to submit your solution

  • Custom User Avatar

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

  • Custom User Avatar

    Yeah I guess I didn't think too much into it, sorry, I changed the name to DropSort

  • Custom User Avatar

    what does this link mean though?

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Hello!
    Thank you for completing my kata, I have updated the test cases following your suggestions.
    If you are interested I have also authored 2 other C# katas, of which 'Top Down Movement System' has a java translation.

  • Custom User Avatar

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

  • Custom User Avatar

    Sorry!

    I just noticed you posted it a week ago, I was waiting for your answer but I expected to receive a notification (and I only got it now). I've tested your code on my machine, with the same test cases posted on Codewars, and it runs without failing, but it does fail by running it online, as you described. I have no idea why it would behave differently while using the same code...

    It could be some unusual interaction, I'm trying to find what's causing it.

  • Custom User Avatar

    What you said is correct, all classes should be defined in the same assembly, in the CreateInstance method I store a reference to the assembly of the first type provided and then I check if all the types in subsequent calls have the same assembly.

    I am not sure why it would fail in your case, could you share your code under spoiler please?

  • Custom User Avatar

    Hello, the order of precedence is considered only when you press multiple keys in the same frame e.g

    Press Down, Press Left, Move -> should be down because of precedence

    Press Down, Move, Press Left -> should be left because it wasn't pressed at the same time as down

  • Custom User Avatar

    All the assertions have been improved!

  • Custom User Avatar

    Thank you for telling me, it should be fixed

  • Custom User Avatar

    I think it's worth pointing out that, while the description says the attributes are x y, in the C# version they are actually X Y, which of course leads to non-existent variable exception.

  • Custom User Avatar

    During the first "frame" when a new key is pressed the direction doesn't matter at all, it is just updated as I stated on point 1 (I didn't emphasize that but I never said you should skip the direction update and go straigth to the movement).
    So when I set the starting direction to 8 I just assign an arbitrary default value, which is irrelevant to the rest of the code and could be any other direction, since it is updated on the first frame anyway.

  • Loading more items...