Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Deck has more cards then it says it does

I created a new game, which came with a playing card deck, and removed the two jokers. After experimenting with the deck for a little while (drawing cards, having a dummy player "deal" cards by dragging them out of the 'choose' window with only backs showing, etc) I decided to simulate a bridge game, to see if roll20 would be useful for such an application. I recalled all cards, shuffled them, and dealt 13 cards to two players (myself and my alt "player" account). I then dealt 13 cards to the tabletop (1 by 1 by dragging them out of the "choose" window) to simulate the other two players. However, when I got to the end of the deck, I noticed the last player had 14 cards, not 13. After hunting through the decks, I realized that somehow the 8 of diamonds had gotten duplicated. See photo: I'm guessing this is because I was dealing cards from the deck 1 by 1 using the "choose" functionality, since there's no other way for non-GM players to deal cards to others (required for a dealer's choice poker game, where the deal passes with each hand), and dealing to the tabletop (without being aware of what the card is) is often required for other games, such as no-peek poker variants. There seems to be a race condition where cards can get duplicated by players dragging them out of the 'choose' window at approximately the same time. Console log:&nbsp;<a href="https://gist.github.com/nightpool/4d93e0a8d43543ad6e96035a5c0dcb5f" rel="nofollow">https://gist.github.com/nightpool/4d93e0a8d43543ad6e96035a5c0dcb5f</a>
Hi Nightpool, This seems somewhat similar to another duplication bug found previously regarding stealing of cards. I will submit a ticket for the devs so they can give it a look :)