Exemplo n.º 1
0
        public gameThread(bool shuffle, Random rand, ManualResetEvent doneEvent)
        {
            this.shuffle = shuffle;
            this.doneEvent = doneEvent;
            this.rand = rand;

            this.hand1 = new cardDeck(rand);
            this.hand2 = new cardDeck(rand);
            this.pile1 = new cardDeck(rand);
            this.pile2 = new cardDeck(rand);
        }
Exemplo n.º 2
0
        private void setup()
        {
            cardDeck deck = new cardDeck(rand);
            deck.Init();
            deck.Shuffle();

            for (int i = 0; i < deck.Size - 1; i++)
            {
                hand1.Add(deck[i]);
                hand2.Add(deck[++i]);
            }
        }