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.
Testing code is outright eldritch. Please do not monkey-patch user object to faciliate testing (a more functional user would
freeze
the prototype and cause your testing method to fail).There are no limits to the possible values of
troublemakersMaxHand
: sometimes100
is passed inside, which is absurd from the rules of the game.This surpasses the realm of "unclear description" and reaches nonsensical realm (in relation to
troublemakersMaxHand
, which is also not mentioned anywhere).An ace do not have a fixed value until resolve time, so whatever this is (aces having a fixed value at dealing time) this would not be Blackjack anymore, as it introduces rules that deviates itself from the actual game.
Also note that this is not "simpler"; you're making things more complicated and deviating from all known standards for no good reasons.
The complete flow of
playGame
is still not mentioned in the description (and only in a comment below).Global
obj
object is created which can be overwritten by accident.No random tests.
deck class should start with capital letter.
If anything, it makes it harder to calculate score this way. I suggest adding score recalculation on every draw.
This line makes sense in practise, but not for this kata. It's not tested anywhere and there's no reason to do this. The line should be removed altogether, imo.