コード例 #1
0
ファイル: Game.cs プロジェクト: RedHobbit/ClockPatience
        public Game()
        {
            _deck = new CardPack();
            _deck.Shuffle();

            FaceUp = new List<Card>[13];
            FaceDown = new List<Card>[13];

            Deal();
        }
コード例 #2
0
        /// <summary>
        /// Shuffle the current pack
        /// </summary>
        public void Shuffle()
        {
            for (int i = 0; i < 100; i++)
            {
                CardPack tempPack = new CardPack();
                tempPack._pack.Clear();

                while (_pack.Count() > 0)
                {
                    tempPack._pack.Add(DealRandom());
                }

                _pack = tempPack._pack;
            }
        }
コード例 #3
0
ファイル: CardPack.cs プロジェクト: RedHobbit/ClockPatience
        /// <summary>
        /// Shuffle the current pack
        /// </summary>
        public void Shuffle()
        {
            for (int i = 0; i < 100; i++)
            {
                CardPack tempPack = new CardPack();
                tempPack._pack.Clear();

                while (_pack.Count() > 0)
                    tempPack._pack.Add(DealRandom());

                _pack = tempPack._pack;
            }
        }