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.
The thing is, for example the function ToIndustrial may get a string passed as argument or an int and due to the nature of C# being strong typed, usually won't let you, what it can have is function overloads and that what I tried doing, (inspired by the rust translation), what can be done to overcome this, is to change the type of the params to the base class "object", then let the user check what data type is the object, let say, if it is an int or an string, which funny enough I actually wrote the first version of the translation like that hahaha. Then again the reason why i did it this way was based on the rust translation, and thought it was good to mimic, but given that you are the original author, I will gladly change it how you want it to be so it can avoid confusions!
Oh I see what you mean, sorry I will definetly change the solution so it can be done without using Linq, it will also make it clear how can be done without it!
One more question: your solution is packed in a class. The kata only asks for three functions. Again, my lack of knowledge in regard to C# comes to play: if it is possible to define only simple functions, I'd prefer that over the expectations that your translation poses. Would a solution pass, that is made up of simple functions?
Hello Gon-CJ,
I've seen your translation only some moments ago, didn't yet go deeper. the first thing that catched my eye is that it seems to me, one cannot solve the C# kata without using the library 'system'. I never programmed in C#, so maybe my caveat is pointless, but I made the experience, that it is problematic, if the expected solution is based on a specific library the warriors have to use. On the other hand, you entered it in the Solution Setup.
Nevertheless, if a solution without use of any libraries at all is possible, that would be the way to do it.
I'm not sure whether I made my point clear... what do you think?
Thanks to your comment i found about this kata, took me a good couples of minutes but i figured it out.
Try to read it carerfully, i didn't understand why i was failing until i read the part which says that the student gains 20pts more if they have 5 courses or more with grades of B or A only. Also the part which says that the points are capped at 200, which i also forgot and was giving me false positives. Maybe rewrite the code? Anyhow, good luck!
The logic of your code handles well when it compares NORTH against SOUTH or EAST against WEST (or viceversa), but doesn't when you need to go in the same direction twice in a row. Try to test for those scenarios. Example, you are given this array: |NORTH -> NORTH -> WEST -> WEST|;
And compare how it behaves with this other array: |NORTH -> SOUTH -> EAST -> WEST|;
Analize the outcome of both.
For what I can see, you are almost done. You just have to think what will happen, let's say, for example, going north twice.
Noice
This comment is hidden because it contains spoiler information about the solution
Really nice Kata, made me happy to be able to understad the Aggregate function in C# with it, i will see if i can do the same with JavaScript eventually!