Robert Valentino Well-Known Member Licensed User Longtime User Sep 25, 2026 #1 Does anyone have a routine that simulates a dealer throw cards at a specific player on a poker table?
Does anyone have a routine that simulates a dealer throw cards at a specific player on a poker table?
TILogistic Expert Licensed User Longtime User Sep 28, 2026 #2 Is this what you want? Example created for B4X (B4A, B4J, B4i) Upvote 0
LucaMs Expert Licensed User Longtime User Sep 28, 2026 #3 ... and this can be useful for managing the deck (the logic): https://www.b4x.com/android/forum/threads/b4x-class-clsrnditems.136776/ Last edited: Sep 28, 2026 Upvote 0
... and this can be useful for managing the deck (the logic): https://www.b4x.com/android/forum/threads/b4x-class-clsrnditems.136776/
TILogistic Expert Licensed User Longtime User Sep 28, 2026 #4 LucaMs said: ... and this can be useful for managing the deck: https://www.b4x.com/android/forum/threads/b4x-class-clsrnditems.136776/ Click to expand... Robert Valentino said: Does anyone have a routine that simulates a dealer throw cards at a specific player on a poker table? Click to expand... If you want to update or improve it, here it is. And apologies for the variable and function names being in Spanish. The cards can be images or font icons. The key to the animations lies in these main variables. B4X: Expand Collapse Copy ' DESTINATION ' The cards are dealt horizontally. Dim Separacion As Float = 62dip Dim AnchoMano As Float = pnlManoJugador.Width Dim CentroMano As Float = pnlManoJugador.Left + AnchoMano / 2 Dim Total As Int = ManoJugador.Size Dim Offset As Float = (PosicionMano - (Total - 1) / 2) * Separacion Dim DestinoX As Float = CentroMano - CartaW / 2 + Offset Dim DestinoY As Float = pnlManoJugador.Top + 5dip ' Flight parameters Dim Duracion As Int = 650 Dim Pasos As Int = 40 Dim Altura As Float = 200 ' Initial size Dim EscalaInicial As Float = 0.70 NOTE: And greetings to my friend @LucaMs, from Chile. I didn't have time to turn it into a class, but I hope someone creates one. Attachments B4XCrupier.zip B4XCrupier.zip 5.5 KB · Views: 71 Last edited: Sep 28, 2026 Upvote 0
LucaMs said: ... and this can be useful for managing the deck: https://www.b4x.com/android/forum/threads/b4x-class-clsrnditems.136776/ Click to expand... Robert Valentino said: Does anyone have a routine that simulates a dealer throw cards at a specific player on a poker table? Click to expand... If you want to update or improve it, here it is. And apologies for the variable and function names being in Spanish. The cards can be images or font icons. The key to the animations lies in these main variables. B4X: Expand Collapse Copy ' DESTINATION ' The cards are dealt horizontally. Dim Separacion As Float = 62dip Dim AnchoMano As Float = pnlManoJugador.Width Dim CentroMano As Float = pnlManoJugador.Left + AnchoMano / 2 Dim Total As Int = ManoJugador.Size Dim Offset As Float = (PosicionMano - (Total - 1) / 2) * Separacion Dim DestinoX As Float = CentroMano - CartaW / 2 + Offset Dim DestinoY As Float = pnlManoJugador.Top + 5dip ' Flight parameters Dim Duracion As Int = 650 Dim Pasos As Int = 40 Dim Altura As Float = 200 ' Initial size Dim EscalaInicial As Float = 0.70 NOTE: And greetings to my friend @LucaMs, from Chile. I didn't have time to turn it into a class, but I hope someone creates one.
LucaMs Expert Licensed User Longtime User Sep 28, 2026 #5 TILogistic said: And apologies for the variable and function names being in Spanish. Click to expand... Google translator : B4X: Expand Collapse Copy ' DESTINATION 'The cards are distributed horizontally. Dim Separation As Float = 62dip Dim HandWidth As Float = pnlPlayerHand.Width Dim HandCenter As Float = pnlPlayerHand.Left + HandWidth / 2 Dim Total As Int = PlayerHand.Size Dim Offset As Float = (HandPosition - (Total - 1) / 2) * Separation Dim DestinationX As Float = HandCenter - CardW / 2 + Offset Dim DestinationY Ace Float = pnlPlayerHand.Top + 5dip ' Flight parameters Dim Duration As Int = 650 Dim Steps As Int = 40 Dim Height As Float = 200 'Initial size Dim InitialScale As Float = 0.70 Upvote 0
TILogistic said: And apologies for the variable and function names being in Spanish. Click to expand... Google translator : B4X: Expand Collapse Copy ' DESTINATION 'The cards are distributed horizontally. Dim Separation As Float = 62dip Dim HandWidth As Float = pnlPlayerHand.Width Dim HandCenter As Float = pnlPlayerHand.Left + HandWidth / 2 Dim Total As Int = PlayerHand.Size Dim Offset As Float = (HandPosition - (Total - 1) / 2) * Separation Dim DestinationX As Float = HandCenter - CardW / 2 + Offset Dim DestinationY Ace Float = pnlPlayerHand.Top + 5dip ' Flight parameters Dim Duration As Int = 650 Dim Steps As Int = 40 Dim Height As Float = 200 'Initial size Dim InitialScale As Float = 0.70
TILogistic Expert Licensed User Longtime User Sep 28, 2026 #6 Don't you ever change, Lucas!!!!! You're the joy of the forum. Upvote 0
LucaMs Expert Licensed User Longtime User Sep 28, 2026 #7 TILogistic said: Don't you ever change, Lucas!!!!! You're the joy of the forum. Click to expand... Unfortunately, there is no chance of me changing. I had hoped to become a better and more serious person as I aged; instead, I fear the opposite is happening Upvote 0
TILogistic said: Don't you ever change, Lucas!!!!! You're the joy of the forum. Click to expand... Unfortunately, there is no chance of me changing. I had hoped to become a better and more serious person as I aged; instead, I fear the opposite is happening
Robert Valentino Well-Known Member Licensed User Longtime User Oct 3, 2026 #8 Thanks so much. Will try this out as soon as I can Upvote 0
Robert Valentino Well-Known Member Licensed User Longtime User Oct 3, 2026 #9 TILogistic said: Is this what you want? Example created for B4X (B4A, B4J, B4i) View attachment 173784 Click to expand... exactly what i am looking for Upvote 0
TILogistic said: Is this what you want? Example created for B4X (B4A, B4J, B4i) View attachment 173784 Click to expand... exactly what i am looking for
William Lancee Well-Known Member Licensed User Longtime User Oct 4, 2026 #10 Please be a good citizen and mark the question as Solved. A like or two wouldn't hurt. Upvote 0
TILogistic Expert Licensed User Longtime User Oct 4, 2026 #11 Do you need the deck of cards as images? In JSON format (Base64), as individual images, or as a sprite sheet? I used it for a Chilean game called Carioca, which is a variant of Rummy. Upvote 0
Do you need the deck of cards as images? In JSON format (Base64), as individual images, or as a sprite sheet? I used it for a Chilean game called Carioca, which is a variant of Rummy.
LucaMs Expert Licensed User Longtime User Oct 4, 2026 #12 TILogistic said: Do you need the deck of cards as images? In JSON format (Base64), as individual images, or as a sprite sheet? I used it for a Chilean game called Carioca, which is a variant of Rummy. View attachment 173903 Click to expand... We left-handers hate that kind of card (real, paper ones). Five-card poker. You know how a player slowly fans out the cards behind the first one; well, a left-handed player sees... four white corners at the top right, behind the first card Last edited: Oct 4, 2026 Upvote 0
TILogistic said: Do you need the deck of cards as images? In JSON format (Base64), as individual images, or as a sprite sheet? I used it for a Chilean game called Carioca, which is a variant of Rummy. View attachment 173903 Click to expand... We left-handers hate that kind of card (real, paper ones). Five-card poker. You know how a player slowly fans out the cards behind the first one; well, a left-handed player sees... four white corners at the top right, behind the first card