Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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
This comment is hidden because it contains spoiler information about the solution
Yeah I guess I didn't think too much into it, sorry, I changed the name to DropSort
what does this link mean though?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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.
This comment is hidden because it contains spoiler information about the solution
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.
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?
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
All the assertions have been improved!
Thank you for telling me, it should be fixed
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.
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...