Advertisement
fatalryuu

Untitled

Dec 4th, 2022
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. void TMainForm::ConfigureRaiseWithPlayers() {
  2. if (isShown) {
  3. if (isRaised)
  4. odds = ChipsTrackBar -> Position - bid;
  5. bid = ChipsTrackBar -> Position;
  6. playersChips[currPlayer] -= bid;
  7. bank += bid;
  8. ChipsTrackBar -> Visible = false;
  9. CurrChipsLabel -> Visible = false;
  10. CurrChipsLabel -> Caption = SELECTED_LABEL + IntToStr(ChipsTrackBar -> Min);
  11. ChipsTrackBar -> Position = ChipsTrackBar -> Min;
  12. BankLabel -> Caption = BANK_LABEL + IntToStr(bank);
  13. ChipsLabel -> Caption = CHIPS_LABEL + IntToStr(playersChips[currPlayer]);
  14. RaiseBtn -> Enabled = false;
  15. HideCardsBtn -> Enabled = true;
  16. if (isRaised) {
  17. prevPlayerWhoRaised = playerWhoRaised;
  18. }
  19. isRaised = true;
  20. playerWhoRaised = currPlayer;
  21. isShown = false;
  22. } else {
  23. if (isRaised)
  24. if (bid == odds)
  25. ChipsTrackBar -> Min = savedBid + 1;
  26. else
  27. ChipsTrackBar -> Min = bid + 1;
  28. ChipsTrackBar -> Max = playersChips[currPlayer];
  29. ChipsTrackBar -> Visible = true;
  30. FoldBtn -> Enabled = false;
  31. CallBtn -> Enabled = false;
  32. CurrChipsLabel -> Visible = true;
  33. isShown = true;
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement