예제 #1
0
        protected virtual void UpdateHandTab(Hand playerHand)
        {
            // Update only if the hand is different than the previous one
            if (PlayerHandHasChanged(playerHand))
            {
                // Clear previous stuff
                handControlLayout.Controls.Clear();

                // Display current hand
                CardListPanel playerCardsPanel = new CardListPanel();
                playerCardsPanel.BackColor = Color.Transparent;
                playerCardsPanel.CardSpacing = CARD_SPACING;
                playerCardsPanel.BorderPadding = CARD_BORDER_PADDING;

                playerCardsPanel.CardListToDisplay = playerHand;
                playerCardsPanel.Height = 80;
                handControlLayout.Controls.Add(playerCardsPanel);

                DisplayOdds(playerHand);
            }
        }
예제 #2
0
        public void DisplayFinalBoard(Board board)
        {
            CardListPanel clp = new CardListPanel();
            clp.CardListToDisplay = board;
            clp.CardSpacing = 4;
            clp.BackColor = Color.Transparent;

            /* We set the initial size of the component to the largest possible, the
                * addPanel method will take care of setting the proper size */
            clp.Size = entityHandsContainer.Size;

            entityHandsContainer.AddPanel(clp, MAXIMUM_CARD_LIST_PANEL_HEIGHT);
        }