Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void TMainForm::ConfigureRaiseWithPlayers() {
- if (isShown) {
- if (isRaised)
- odds = ChipsTrackBar -> Position - bid;
- bid = ChipsTrackBar -> Position;
- playersChips[currPlayer] -= bid;
- bank += bid;
- ChipsTrackBar -> Visible = false;
- CurrChipsLabel -> Visible = false;
- CurrChipsLabel -> Caption = SELECTED_LABEL + IntToStr(ChipsTrackBar -> Min);
- ChipsTrackBar -> Position = ChipsTrackBar -> Min;
- BankLabel -> Caption = BANK_LABEL + IntToStr(bank);
- ChipsLabel -> Caption = CHIPS_LABEL + IntToStr(playersChips[currPlayer]);
- RaiseBtn -> Enabled = false;
- HideCardsBtn -> Enabled = true;
- if (isRaised) {
- prevPlayerWhoRaised = playerWhoRaised;
- }
- isRaised = true;
- playerWhoRaised = currPlayer;
- isShown = false;
- } else {
- if (isRaised)
- if (bid == odds)
- ChipsTrackBar -> Min = savedBid + 1;
- else
- ChipsTrackBar -> Min = bid + 1;
- ChipsTrackBar -> Max = playersChips[currPlayer];
- ChipsTrackBar -> Visible = true;
- FoldBtn -> Enabled = false;
- CallBtn -> Enabled = false;
- CurrChipsLabel -> Visible = true;
- isShown = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement