Ad
  • Default User Avatar

    Note: This kata uses the non-padding version ("=" is not added to the end).

    This is enforced in Python, but not in C# and JavaScript

  • Custom User Avatar
    • The function name should be in camelCase
    • There's no reason to use classes for this task
    • The tests modify Player instances after creation (not an issue per se, but there's no reason to do so, and this can lead to unexpected bugs in otherwise perfectly valid solutions)
    • There's already a kata about calculating Blackjack score, and the added task of comparing values doesn't make this kata more interesting
  • Default User Avatar

    No random tests.

  • Custom User Avatar

    C# tests are not updated?

    Instruction says that non-padding version is used. How come I still get this message?

    Test Failed
    Expected string length 20 but was 18. Strings differ at index 18.
    Expected: "cGFkZGluZywgc2lyPw=="
    But was: "cGFkZGluZywgc2lyPw"

  • Custom User Avatar

    I think more test cases are in order, optimally a couple of hundred random test cases or more. If you want, you can PM on gitter (use my github name) and I can help create random test cases.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    If the player's hand is [7, 3, 11] and the dealer's is [4, 7, 11, 9], who should win?

    The way I understand the requirements, the dealer should win, but some solutions will say that the player did.

    • the player didn't get 21 on the first two cards
    • the player hasn't exceeded 21 but also hasn't reached a higher final score than the dealer (they're tied)
    • the dealer's hand didn't exceed 21

    So we have a tie and house rules say that the dealer wins.

    Am I reading this correctly? Anyway, either way, it would be a good test case to add, I think.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution