So I recently started work on bringing over some old casino styled game scripts over to the site, as posted about Here
, and the first game I brought over is Poker. It's basically a PHP based version of basic Video Poker, sort of. Already I have made some massive improvements on this since first posting about it, and there is one aspect of Video Poker I am stuck on; shuffling.
PHP has a built in function to shuffle any given array, which is basically what a deck of cards is.
The way I have always done this is create a new deck, Ace through King, by Spades, Hearts, Clubs then Diamonds. Then I shuffle the deck a few times and that is the deck used for all games (Poker, and Blackjack).
For Blackjack this makes sense, and because of how I did that script I am probably going to keep it that way. But with Poker, I was always curious as to how actual Video Poker handled shuffling.
I did a little reading, which was interesting, on the site VideoPoker.com
. Long story short, the deck gets constantly shuffled in real Video Poker until you hit the 'Deal' button. The top five cards are drawn in order, then those cards are removed from the deck and the rest of the deck is also constantly shuffled until you choose to draw new cards.
Now, I'm not going to write a script that just constantly shuffles an array until you decide to do something. However, this DID get me to thinking; should I at least somewhat follow suit? So shuffle multiple times, draw the top 5, then remove them from the deck and shuffle the rest before you draw your replacements?
OR should I just keep the script as is?
I'm going to experiment with this a bit and see if I notice any difference... But if anyone is reading this and has any thoughts I'd be very interested to hear what they are.
This site is a work in progress. Keep up to date in my Site Notes