GrassGames' Cribbage

 

DECK CUTTING INSIGHTS

 

 

Over the years, many people have complained that the cards are fixed,
and that the starter card nearly always favors the computer.

 

This alas is just a run of bad luck when playing against the computer.

 

First of all, naturally, we want people to enjoy the game as much as possible,
enough so that someday they might purchase a copy.

Fixing the game so that the computer always wins is not something that
makes any sense from any point of view, and is not implemented in the game.

 

For those who are experiencing the computer always winning,
I will show below how at least half of the time the cards that get
dealt are completely a result of where you physically cut the deck with the mouse.

 

Note

The screens below have all the cards shown face up, and the cards spread a little wider for better visibility. These are the only differences - purely cosmetic ones for demonstration purposes only.

 

In the game, half of the time in the game you cut the deck (when the computer is dealing).

Below is shown an example human cut of the deck:

 

 

The deck being cut at the Seven of Hearts results in this
card becoming the top card after the deck is cut, and also
being the first card dealt to your hand.

 

 

All the other cards dealt are the cards that follow in the deck.

Now, as noted in the first picture, the card 12 cards after the cut
becomes the starter card for the game:

 

 

So, as you can see, half of the time the cards dealt and the starter card
are purely a result of where you cut the deck.

 

The other half of the time is purely random also.
The only way we can demonstrate this is to show the actual code used.

 

Here's the code for the shuffling of the deck:

// max seed number is 4294967295
// swap two cards 70000 times gives 70000*70000 variations = 4900000000 variations

for (i=0; i<70000; i++)
{
   int r1,r2,ts,tr,ttm;

   r1 = EngRandom()%(m_num_cards-1) + 1; // 1 to num-cards-1

   do
   {
      r2 = EngRandom()%(m_num_cards-1);
   } while (r2 >= r1);

   // just shuffle the suit and rank and model nums - leave the rest as is

   ts = m_cards[r2].m_suit;
   tr = m_cards[r2].m_rank;
   ttm = m_cards[r2].m_face_tex_mod_num;

   m_cards[r2].m_suit = m_cards[r1].m_suit;
   m_cards[r2].m_rank = m_cards[r1].m_rank;
   m_cards[r2].m_face_tex_mod_num = m_cards[r1].m_face_tex_mod_num;

   m_cards[r1].m_suit = (CardsSuit)ts;
   m_cards[r1].m_rank = (CardsRank)tr;
   m_cards[r1].m_face_tex_mod_num = ttm;
}

 

And here's the computer deciding where to cut the deck code:

gv->cut_for_dealer_comp_card = rand()%52;

 

 

Not much more we can add to this, except to say to those that are not happy to hang in there,
and hopefully your luck will change one of these days.