|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Blackjack] Counting Cards
While not mentioned, it is frowned upon to count cards at the casino. Are we allowed to count cards in our code? It will make knowing what to play and how much to stake in the final stages of the game that much more predictable!
Can we hold an array or dealt cards? |
|
#2
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
Why wouldnt it be allowed?
|
|
#3
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
Hi!
As far as I understand the rules, the following will prevent us from storing the dealt cards in an external file: Code:
Your script should not try to access anything external (meaning files, databases, other programs, servers, aliens or anything else), the only allowed way of communication is by calling the above functions. So how could one remember the cards played? CU maxhb |
|
#4
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
how about... like variables?
|
|
#5
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
An internal array.
On every execution of the script, a new deck is shuffeld; and then you can start counting till the end of the script (or till you are broke) ;) |
|
#6
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
You may count cards, we're not a casino
It's true that you may not write to files, but this contest is somewhat different from the previous, as it's not run from a webserver and gets executed once per n decks. So, you may easily keep track of the cards that were played. |
|
#7
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
Heh, looks like I'm going to have to read up on card counting techniques
|
|
#8
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
Ooh that looks nice
|
|
#9
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
for some reason i can't get the logic right in my head... i keep generating infinite loops and all that wonderful kind of stuff... *offers jeff his first born for a peek at his little helper there*
|
|
#10
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
Nice page however if you bust it doesn't matter what the dealer does so both of you busting would never occur. so if your hand is greater then 21 you lose. There is no other cards that would get drawn.
|
|
#11
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
It seems in this version of the game if you bust, the dealer keeps drawing according to his rules. If you both bust, it's a tie.
Q,6 (16) HIT Q,6,10 (26) BUST Dealer: 4 A K 10 (25) BUST The dealer keeps drawing after his first 2 cards although you have already busted. Your bet is refunded. |
|
#12
|
|||
|
|||
|
[Blackjack] RE: Counting Cards
Oh and Oracle, sorry but I don't need any kids right now
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > [Blackjack] Counting Cards |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|