示例#1
0
        public Gameboard()
        {
            var cards = Enumerable.Range(0, 52)
                        .Select(x => (Weight: Random.Next(), Card: new Card(x)))
                        .OrderBy(x => x.Weight)
                        .Select(c => c.Card);

            Tableau = new Tableau(cards);

            for (int index = 0; index < GamePiles.Count(); index++)
            {
                GamePiles[index] = new CardStack();
            }

            DealCards();
        }