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 there!
Many thanks for reading my code and giving usefull critics and suggestions. I agree on every point...
...I just don't understand the "added bonus" part. If I convert the enum value to a string wouldn't that be a number anyway (visually talking)? For example:
Result.Win.ToString() should be "0" no? Maybe I just don't get what you wrote.
Thanks again for the kind reply!
Nicola
Hi,
A few remarks that popped up when reading through your code:
Instead of using /////////////////////BANNERS/////////////////////////// to partition your code, you could use classes or methods so take care of that partitioning. The fact that you didn't want to go for that, might indicate that there's for example a class hiding in there.
Instead of using integer values as a representation for the card values, you could have used an enum.
Below the surface, enums have integer values as well, so you can still compare them against each other.
An added bonus would be that you can convert the enum value to a string, which then actually represents the card in a human readable format.
Make sure that the methods have logical names, representing what they do / produce. For example HandValue() isn't to clear to me. It returns an array of integers, so maybe GetHandValues() would be more appropriate? Having good naming makes reading the code easier.
Kind regards,
Maurice
Can you post some sketch of your code, or pseudocode of your solution, so I'll try to help. There is a lot of space for optimalization in this problem, but I'd like to know where to start.
This comment is hidden because it contains spoiler information about the solution