The three rules of Ruby Q.:
Please do not post any solutions or spoiler discussion for this quiz
48 hours have passed from the time on this message.
Support Ruby Q. by submitting ideas as often as you can:
Suggestion: A [QUIZ] in the subject of emails about the problem helps
on Ruby T. follow the discussion. Please reply to the original quiz
if you can.
Learning to count cards is much easier than Hollywood or the casinos
us believe. Some systems only require you to track a single running
One such system, called the Knock-out system of card counting, is extra
You start your count at 4 - (4 x number_of_decks). That gives us an
running count of 0, -4, -20, or -28 for the common casino shoe sizes of
1, 2, 6,
or 8 decks. From there, you add one each time you see a 2, 3, 4, 5, 6
or 7 and
subtract one when you see a 10, jack, queen, king, or ace. The 8 and 9
not affect the count. Once you learn to track the running count, you
strategy decisions and vary your bets based on the times when the count
That’s not a lot to remember, but it does take practice to get fast.
need to get to where you can count a deck in 20 to 30 seconds if you are
to keep up with those fast moving casinos dealers.
This week’s Ruby Q. is to build a training program for helping you
The program needs to show you one or more cards at a time, running
Blackjack shoe. As it goes, the program should track the running count.
it pause at random intervals, ask you the count, and notify you if you
Both the time to go through the deck and the number of cards displayed
at a time
should be configurable. It’s important to practice with seeing multiple
at once because you learn to cancel out pairs of high and low cards. It
even be nice to provide a mixed mode, which varies the number of cards
You can show cards as simple Strings, ASCII art, or full graphics as you
You may wish to make cards fully disappear after their display time
make the conditions more like they would be in a casino.