The main point here is actually that the initial design of the class is flawed. I hacked it (which is bad, yes) because this should have been implemented in the class in the first place.
In the context of the kata, it cannot be because there isn't much left to do on the user's side, but the overall design isn't really good. Let's go even further, the proper design should be something like what is in the fork (but implemented properly on the Game class, ofc...)
Just for my own peace of mind, this should not be considered a best practice because it mutates something outside the function even though it is giving it a desired property. (I definitely think it's clever though.)
bruh what
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
it's already mentioned that only valid arguements will be passed
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
no, that's not at all the solution to that problem... ;)
The main point here is actually that the initial design of the class is flawed. I hacked it (which is bad, yes) because this should have been implemented in the class in the first place.
In the context of the kata, it cannot be because there isn't much left to do on the user's side, but the overall design isn't really good. Let's go even further, the proper design should be something like what is in the fork (but implemented properly on the Game class, ofc...)
Just for my own peace of mind, this should not be considered a best practice because it mutates something outside the function even though it is giving it a desired property. (I definitely think it's clever though.)
This comment is hidden because it contains spoiler information about the solution
Per the description:
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...