// Raise method
 public void Raise()
 {
     if (momenteleInzet <= inzetPot)
     {                                                                                                //momentele inzet is kleiner of gelijk aan als de inzet de pot
         momenteleInzet = inzetPot + _controllerPlayer.getControllerPoker().getModelPoker().BigBlind; // momentele inzet is gelijk aan de inzet in de pot + big blind
         kapitaal       = startKapitaal - momenteleInzet;                                             // berekening huidig kapitaal
     }
     else if (kapitaal >= inzetPot)
     {               // All-in knop: want eigen kapitaal is kleiner als inzet pot
         _controllerPlayer.getControllerPoker().getModelPoker().View_button.updateUIAllin();
     }
 }
        private void playerView_Load(object sender, EventArgs e)
        {
            //toevoegen kaarten
            List <cardView> cards      = _controller.getCardsView(); //Lijst met alle views
            int             cardWidth  = cards[0].Width;
            int             cardHeight = cards[0].Height;

            foreach (cardView card in cards)
            {
                cardView currentCard = card;

                int xPos = cards.IndexOf(card) * cardWidth; //x positie zetten afhankelijk van index en width
                currentCard.Location = new Point(xPos, 0);

                Controls.Add(currentCard); //huidige kaart toevoegen aan view

                currentCard.updateView();
            }
            int height = this.PreferredSize.Height - kapitaal.PreferredHeight - 7;
            int width;

            if (_controller == _controller.getControllerPoker().getModelPoker().FlopController)
            {
                width         = 50;
                kapitaal.Text = "Totaalpot: € 99";
            }
            else
            {
                width         = 40;
                kapitaal.Text = "Uw kapitaal: € 99";
            }
            kapitaal.Location = new Point(width, height);
        }
Example #3
0
        private void playerView_Load(object sender, EventArgs e)
        {
            //toevoegen kaarten
            List <cardView> cards      = _controller.getCardsView(); //Lijst met alle views
            int             cardWidth  = cards[0].Width;
            int             cardHeight = cards[0].Height;

            foreach (cardView card in cards)
            {
                cardView currentCard = card;

                int xPos = cards.IndexOf(card) * cardWidth; //x positie zetten afhankelijk van index en width
                currentCard.Location = new Point(xPos, 0);

                Controls.Add(currentCard); //huidige kaart toevoegen aan view

                currentCard.updateView();
            }
            int height = cardHeight;

            if (_controller == _controller.getControllerPoker().getModelPoker().FlopController)
            {
                naam.Hide();
                curInzet.Hide();
                height       += 5;
                kapitaal.Font = new Font(kapitaal.Font.Name, (kapitaal.Font.Size + 5), kapitaal.Font.Style, kapitaal.Font.Unit);
            }
            else
            {
                updateName();
                naam.Location = new Point(5, height);
                height       += naam.Height + 5;
                updateCurInzet();
                curInzet.Location = new Point(5, height + kapitaal.Height + 5);
            }
            updateKapitaal();
            kapitaal.Location = new Point(5, height);
        }