Ad
  • Custom User Avatar

    the test cases sort a list of PokerHand classes, and you need to sort them based on the hand value.

    ah crap, I actually don't understand it too; I pass example test cases but the random test cases just say "failed at test n".

    I'm confused, what?

    failed at test 0: [JH AH TH KH QH, JH 9H TH KH QH, 5C 6C 3C 7C 4C, 2D 6D 3D 4D 5D, 2C 3C AC 4C 5C, AS AC AH KS AS, JC 7H JS JD JH, JC 6H JS JD JH,
    KH KC 3S 3H 3D, 2H 2C 3S 3H 3D, 3D 2H 3H 2C 2D, JH 8H AH KH QH, 3S 8S 9S 5S KS, 4C 5C 9C 8C KC, 8C 9C 5C 3C TC, QC KH TS JS AH, JS QS 9H TS KH, 
    6S 8S 7S 5H 9H, 3C 5C 4C 2C 6H, 2C 3H AS 4S 5H, AC KH QH AH AS, 7C 7S KH 2H 7H, 7C 7S 3S 7H 5S, 6C 6S 3S 6H 5S, 3C KH 5D 5S KC, 5S 5D 2C KH KC, 
    3H 4C 4H 3S 2H, AH 8S AH KC JH, KD 4S KD 3H 8S, KC 4H KS 2H 8D, QH 8H KD JH 8S, 8C 4S KH JS 4D, KS 8D 4D 9S 4S, KD 6S 9D TH AD, TS KS 5S 9S AC, 
    JH 8S TH AH QH, TC 8C 2S JH 6C, 2D 6D 9D TH 7D, 9D 8H 2C 6S 7H, 4S 3H 2C 7S 5H] 
    
    should equal [JH AH TH KH QH, JH 9H TH KH QH, 5C 6C 3C 7C 4C, 2D 6D 3D 4D 5D, 2C 3C AC 4C 5C, AS AC AH KS AS, JC 7H JS JD JH, JC 6H JS JD JH, 
    KH KC 3S 3H 3D, 2H 2C 3S 3H 3D, 3D 2H 3H 2C 2D, JH 8H AH KH QH, 4C 5C 9C 8C KC, 3S 8S 9S 5S KS, 8C 9C 5C 3C TC, QC KH TS JS AH, JS QS 9H TS KH, 
    6S 8S 7S 5H 9H, 3C 5C 4C 2C 6H, 2C 3H AS 4S 5H, AC KH QH AH AS, 7C 7S KH 2H 7H, 7C 7S 3S 7H 5S, 6C 6S 3S 6H 5S, 3C KH 5D 5S KC, 5S 5D 2C KH KC, 
    3H 4C 4H 3S 2H, AH 8S AH KC JH, KD 4S KD 3H 8S, KC 4H KS 2H 8D, QH 8H KD JH 8S, 8C 4S KH JS 4D, KS 8D 4D 9S 4S, KD 6S 9D TH AD, TS KS 5S 9S AC, 
    JH 8S TH AH QH, TC 8C 2S JH 6C, 2D 6D 9D TH 7D, 9D 8H 2C 6S 7H, 4S 3H 2C 7S 5H]
    
  • Custom User Avatar

    Python: I feel like it could be made a bit clearer what you're supposed to do in terms of returning a sorted value. Are you supposed to define a sort function? Are you supposed to put something in init? Are you supposed to use functools?
    If this is part of the kata, then sure, but I feel it could be better specified.

  • Custom User Avatar

    Yeah, this description is a pain. Also allocating the remaining residual seats after combinations have been handled is a complete mystery. I wanted to solve this kata out of loving memory for Pim, but F it, just not worth it.

  • Custom User Avatar

    Haskell setup code shows BullDS for the bulls-eye return value when the actual value should be SingleBullDS

  • Custom User Avatar

    man. someone else always came up with such elegant solutions.

  • Custom User Avatar

    Interesting and funny kata to learn and understand some new concepts.

  • Custom User Avatar

    @mmangiamusardo please mark your post as having spoiler content next time.

  • Custom User Avatar

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

  • Custom User Avatar

    for input {2,2,1,3,2,2,3,1,1,2,2,3,3,2,1,3} my algorithm produces valid solution {{1,3,4,2},{4,2,1,3},{3,4,2,1},{2,1,3,4}}
    yet the test says it's wrong.

  • Custom User Avatar

    Enjoyable coding challenge, congratulations.

  • Custom User Avatar

    For what it's worth, from my perspective I thought it was pretty clear. I wonder what you think is poorly explained?

  • Custom User Avatar

    Had to make a web app so that I could visualize & interact with the problem, but after that I was able to find a solution. Very fun kata, not like any I had done before, +1

  • Custom User Avatar
  • Custom User Avatar

    I don't think the problem is well explained at all.

  • Custom User Avatar

    it is very likely that one hand get used multiple times

    So, that's it! Thanks, now totally explained.

    In all of the initial tests Hands are created, tested once and then freed. That let me to the assumption that it would always be that way. My mistake. Thanks again.

  • Loading more items...