Discuss Scratch

wmsliam_a
Scratcher
20 posts

Texas Holdem "Burning" Glitch

To anyone who hasn't played a game of Texas Holdem in their life:

Burning a card is when you get rid of a card (ex. If I burn an Ace of Spades, it will not be used throughout the game). I plan on using this is with a message that will read each player's deck to see if a select random card is in each player's deck. If the select random card is in a player's deck, it will keep generating a random card until no players have it. Then the card will be added to the burnt cards list. On their own, the scripts seem to work fine, but when I attach it to the “when I receive” hat, it generates 9 cards in the burnt cards list. I've reviewed the code several times, yet I don't have an answer on how to fix it. Please let me know how to fix this!

Thank you!

-wmsliam_a

https://scratch.mit.edu/projects/1056513896/
TheWeeklyReader
Scratcher
100+ posts

Texas Holdem "Burning" Glitch

I have no clue what to do, but this may get flagged as a gambling game, since Texas Holdem is a cards / casino game
yadayadayadagoodbye
Scratcher
1000+ posts

Texas Holdem "Burning" Glitch

TheWeeklyReader wrote:

I have no clue what to do, but this may get flagged as a gambling game, since Texas Holdem is a cards / casino game
Portrayal of gambling isn't banned on Scratch
TheWeeklyReader
Scratcher
100+ posts

Texas Holdem "Burning" Glitch

I thought anything that might encourage gambling, such as winning in a game that is used in a casino, was banned.
Jlerpy
Scratcher
1000+ posts

Texas Holdem "Burning" Glitch

I don't understand how you've done your card dealing at all.
To me, it would make sense to fill a Deck list, dump that into a Discard list, randomly put cards back one at a time into Deck (and delete them as you do), then burn a card by moving it from Deck to Discard, before dealing cards to the players.
wmsliam_a
Scratcher
20 posts

Texas Holdem "Burning" Glitch

Jlerpy wrote:

I don't understand how you've done your card dealing at all.
To me, it would make sense to fill a Deck list, dump that into a Discard list, randomly put cards back one at a time into Deck (and delete them as you do), then burn a card by moving it from Deck to Discard, before dealing cards to the players.


I knew I could’ve done something better in my code. Thank you!
Jlerpy
Scratcher
1000+ posts

Texas Holdem "Burning" Glitch

wmsliam_a wrote:

Jlerpy wrote:

I don't understand how you've done your card dealing at all.
To me, it would make sense to fill a Deck list, dump that into a Discard list, randomly put cards back one at a time into Deck (and delete them as you do), then burn a card by moving it from Deck to Discard, before dealing cards to the players.


I knew I could’ve done something better in my code. Thank you!

So happy to help!

Powered by DjangoBB