Exemple #1
0
        //Temporal field (for fixing class GameParticipant):
        //private GameParticipant participant;
        #endregion

        public GameEngine()
        {
            this.deckOfCards = new DeckOfCards("Assets\\Cards", "*.png");
            this.call = this.bigBlind;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.update.Start();
            this.InitializeComponent();
            this.InitializeCardLocations(cardLocations);
            //int width = this.Width;
            //int height = this.Height;
            this.Shuffle();
            this.potTextBox.Enabled = false;

            this.player.ParticipantPanel.ChipsTextBox.Enabled = false;
            this.player.ParticipantPanel.ChipsTextBox.Text =
                string.Format("Chips : {0}", this.player.Chips);

            for (int bot = 0; bot < NumberOfBots; bot++)
            {
                this.gameBots[bot].ParticipantPanel.ChipsTextBox.Enabled = false;
                this.gameBots[bot].ParticipantPanel.ChipsTextBox.Text =
                    string.Format("Chips: {0}", this.gameBots[bot].Chips);
            }

            this.timer.Interval = 1 * 1 * 1000;
            this.timer.Tick += this.TimerTick;
            this.update.Interval = 1 * 1 * 100;
            this.update.Tick += this.UpdateTick;

            this.bigBlindTextBox.Visible = true;
            this.smallBlindTextBox.Visible = true;

            this.raiseTextBox.Text = (this.bigBlind * 2).ToString();
        }
Exemple #2
0
 public CardDealer(IDeckOfCards deckOfCards)
 {
     this.playerHand         = new Card[NumberOfCardsPerHand];
     this.computerHand       = new Card[NumberOfCardsPerHand];
     this.sortedPlayerHand   = new Card[NumberOfCardsPerHand];
     this.sortedComputerHand = new Card[NumberOfCardsPerHand];
     this.DeckOfCards        = deckOfCards;
 }