Closed pastly closed 2 years ago
See 8a9daa006c3c94ec477cbd5b29d9d4297fd2db9d. Basically I changed deal_pocket() to deal all pockets for the game. This makes more sense anyway, since pockets are only dealt once, all at the same time. This allowed a little more control over the enumeration to fix the logic error.
Incoming branch that demonstrates the issues.
- 1
. If there's one player, they should get card at index 51 and 50, but instead the function tries to give them card 51 and 51. Not possible.WXYZ
. First call for the first player's cards gives him ZX (assuming fix from #1 is impl). The second call gives second player Y ... and not W. Whatever is before W. Because Y and W are now next to each other at it is wrong to skip.I believe that we should .pop() .pop() to avoid this whole thing, even though it isn't how poker hands are dealt. It shouldn't matter mathematically.