Exemplo n.º 1
0
        public void Initialize()
        {
            this.CreateTable(out this.TableManager);
            this.CreateDealerDeck(out this.CreateDealerDeck, out this.DealerDeckLayoutManager);


            this.DealerHandLayoutManager = CreateDealerHand();
            this.PlayerHandLayoutManager = CreatePlayerHand();

            this.TableManager = new TableManager()
            {
                Table = new Table()
            };
            this.TableManager.OnCardAddedToDeck += this.OnCardAddedToDeck;

            TableManager.AddDecksToTable(this.Table, this.DealerDeck, this.DealerHand, this.PlayerHand);
            TableManager.FillDeck(this.DealerDeck);
            TableManager.Shuffle(this.DealerDeck);
        }
Exemplo n.º 2
0
        public void Initialize()
        {
            this.DealerDeckOptions = new DeckOptions(52)
            {
                CardDisplayFormat = Card.Formats.ConciseLetter
            };
            this.HandDeckOptions = new DeckOptions(1)
            {
                CardDisplayFormat = Card.Formats.ConciseLetter
            };

            this.DealerDeck = new Deck()
            {
                DeckName = "Dealer Deck",
                Options  = DealerDeckOptions
            };

            this.DealerHand = new Deck()
            {
                DeckName = "Dealer Hand",
                Options  = HandDeckOptions
            };

            this.PlayerHand = new Deck()
            {
                DeckName = "Player Hand",
                Options  = HandDeckOptions
            };

            this.Table = new Table()
            {
            };

            this.TableManager = new TableManager()
            {
                Table = this.Table
            };
            this.TableManager.OnCardAddedToDeck += this.OnCardAddedToDeck;

            TableManager.AddDecksToTable(this.Table, this.DealerDeck, this.DealerHand, this.PlayerHand);
            TableManager.FillDeck(this.DealerDeck);
            TableManager.Shuffle(this.DealerDeck);
        }