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.
I liked this kata, but it wasn't easy for me, as for a beginner in coding, to comprehend the usage of function in terms of a Class, that's why I recommend to anyone struggling like me to rewrite the default code as a simple Class.
I wanted to add some additional notes due to OOP, but they were unnecessary anyway. Undid the changes ✅
I'm personally curious about the need or desire to mention a method for C# or Java, when a.) this is relevant to any classical language, and b.) it should be obvious from the method call in the code example, in any case, the wording seems to suggest that C#/Java are the only language katas that are asking for a method, while any classic language is.
Though, this is made explicit in the code example, anyway.
I could add Sample Tests for C# when my Java translation gets approved due to the changes in the description
Updated Java Translation
Updates:
GetColor
/getColor
method not being mentioned in the descriptionShould be 8kyu
No random tests in Python.
C#: No sample tests
ball_type
is a method, not a property.Also, OP solved it, closing
This might shed some light
Ghost objects are given a random color **attribute**
Your code is writing a method for theGhost
class.As I mentioned the part in this kata that encourages you to write your own tests is good. I agree with that. But still I wrote my tests and everything was ok. But then when I tried to attempt the solution it gave me errors and the message was that It could not recognise the Ghost class even though I imported the class and passed the tests. And by the way I was using Java to solve the problem.
Yeah, I guess you are referring to the C# translation. I'd like to just remove it, but it was created several years ago (unfortunately after the kata itself was out of beta), and any changes to it now would potentially break solutions that have already passed.
I would not select an option to allow translations for any kata that I made going forward.
This comment is hidden because it contains spoiler information about the solution
oh okay. Out of curiousity, which language(s) did you try?
When I first made this kata, I thought it was better not to include tests in an attempt to encourage people to write their own, but that might not be what the community considers "best practices" now.
As for the errors, did they give any error messages?
Loading more items...