cohenna / php-blackjack

Blackjack in PHP
8 stars 9 forks source link

was wondering if this code can have 3 hand split #1

Open c4pt opened 11 years ago

c4pt commented 11 years ago

hey i was wondering if you have the time to write in a 3 hand split max for this code

like if the player splits on the first hand and gets another card that they can split with. split again to have two hands if the player gets another card to split with split that hand to have 3 total hands to play

the other 3 hands would not be able to split since the max of splitting is 3 hands

ten being either a ten or a face card

ten,(5) (card dealth assuming two tens or two face cards here) (finally dealt a 5)

ten,2

ten,3

ten,4

as an example

if the cards were dealt like this

3 splits first card gets dealt ten 3 times split then and the hand gets drawn a 2 they get a ten again split that hand gets a 3 the original hand gets a ten again split the player is dealt a ten but cant split since its a max of 3 splits

ten(5) (card dealt assuming two tens or two face cards here) (finally dealt a 5)

ten,2

ten,3

ten,ten (the player can not split this hand)

two splits:

ten,(5) (card dealt assuming two tens or two face cards here) (finally dealt a 5)

ten,ten (two tens) (the player can split this hand)

ten,2 (next card is an example of "2" card )

three splits

ten,(5) (card dealt assuming two tens or two face cards here) (finally dealt a 5)

ten,2 (two tens) (next card is an example of "2" card)

ten,ten (two tens) (the player can split this hand)

ten,3 (max splits if this card is not a "3" and its a ten the player can not split)

also with some gambling you can only get 1 card on two aces if you split when dealt two aces

please if you can write in a 3 max split option please also write in a rule for spliting on aces

with a variable to either split two aces and only one card per Ace or an options ot replit aces

aces would look like this

A,(5) (card dealt is assuming two aces) (finally dealt a 5)

A,4 (player has 14 or 4)

player cant not split after the aces if even dealt another ace

*option to resplit on aces

A,(5) (card dealt is two aces) (finally dealt a 5)

A,(2) (two aces) (player can split again

A,3 (player has 14) or (4)

A(5) (card dealt is two aces) (finally dealt a 5)

A,(4) two aces

A,(3) two aces

A,2 (player cant split this hand max of 3 splits) (player has 13 or 3)

i think the last example of resplitting aces is wrong anyway because there are 4 aces

so even if you take 2 aces

A (A) <-(A) (A) (move an ace over an ace is dealt) <-(A) (A) (move an ace over an ace is dealt) <-(A) (this next card is impossible to be an ACE has to be a different card since all 4 aces have been split

im not 100% sure though

you would still have a max of 3 splits if there was an option to resplit aces

but either way could you please write in options for spliting with a max of 3 splits and an option

to either split on aces with one card being dealt or split on aces with "repliting aces" ?

Jafnee commented 10 years ago

yes