コード例 #1
0
        /// <summary>
        /// Setup all the basic data structure that will be used to manage the game.
        /// </summary>
        public static void SetupGame()
        {
            drawPile = new CardPile(true);
            drawPile.ShufflePile();
            discardPile = new CardPile();
            suitValues = new List<Int32>();
            suitPiles = new List<CardPile>();
            for (int i = 0; i<4; i++)
            {
                suitValues.Add(-1);
                suitPiles.Add(new CardPile());
            }

            hideSection = new List<int>();
            tableauPiles = new List<Hand>();
            for (int i = 0; i < 7; i++)
            {
                hideSection.Add(i);
                Hand pile = new Hand(drawPile.DealCards(i+1));
                tableauPiles.Add(pile);
            }
        }
コード例 #2
0
 /// <summary>
 /// Setup the inital game.
 /// </summary>
 public static void SetupGame()
 {
     turn = Turn.Player;
     drawPile = new CardPile(true);
     drawPile.ShufflePile();
     discardPile = new CardPile();
     playerHand = new Hand(drawPile.DealCards(8));
     computerHand = new Hand(drawPile.DealCards(8));
     current = drawPile.DealOneCard();
     discardPile.AddCard(current);
     start = true;
 }