Ad
  • Default User Avatar

    and i read wiki rules of BJ and 21 points its win. Whats wrong with that kata?

  • Custom User Avatar

    I didn't understand the description...

  • Custom User Avatar

    Hi,

    well... :/ The requirements make no sense at all, for now.

    • the initial solution is wrong
    • 5 random tests aren't enough. Use 100 of them
    • 'AA' leading to "0 cards and lose" is just wrong. In this case A count for 1 not 11. => follow the real rules of BJ.
    • it's totally not clear what should be used to decide how many cards to draw and if one loses or wins (and don't tell me it's to the user to figure it out... x) At that point, if the user has to do so, it's like poking randomly in the dark to find out what twisted idea you got on your side... x/ )
    • description talks about "probably win/lose", but not the sample tests (at least. I didn't run the tests)

    Lots of things to tackle, in there...

    cheers

  • Custom User Avatar

    Thanks so much ;)

  • Custom User Avatar
  • Custom User Avatar

    Hello

    • I added the random test.
    • No test for bigger than 21, cause with 2 cards in black jack you cant have bigger than 21, I clarified it in the instructions
    • I will try a better one in the next one, this has been y first kata creation.
  • Default User Avatar

    I'm agree with your first and last points... and at least the kata must have random tests to be approved ^^

    However, your second point sounds more like a suggestion to improve the kata (and maybe upgrade it to a 7 kiu one) by adding input validity check... but for a 8 kiu kata, we could expect only valid input values to be passed to the function (or that's should be explicitly stated in the description that input should be checked, and other invalid values -- negative, float, wrong types -- must be tested -- and behavior in such cases must be also explicitly stated in description) ;)

  • Custom User Avatar
    • No random tests
    • No tests with values > 21
    • A bunch of if's is neither novel nor interesting kata idea