double AdjustedBetsize(double amount_to_raise_to) {
	double original_amount_to_raise_to = amount_to_raise_to;
  write_log(Preferences()->debug_betsize_adjustment(),
    "[BetsizeAdjustment] Rounding to beautiful numbers\n");
  // Rounding to beautiful numbers but only if enabled
  amount_to_raise_to = RoundToBeautifulBetsize(amount_to_raise_to);
  double minimum;
  if (p_engine_container->symbol_engine_casino()->ConnectedToDDPoker()) {
    write_log(Preferences()->debug_betsize_adjustment(),
      "[BetsizeAdjustment] Special adjustment for DDPoker needed.\n");
	  minimum = min(MinimumBetsizeDueToPreviousRaise(), MaximumBetsizeDueToMaxOppStack() );
  } else {
	  minimum = MinimumBetsizeDueToPreviousRaise();
  }
	AdaptValueToMinMaxRange(&amount_to_raise_to, minimum, amount_to_raise_to);
	AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, MaximumBetsizeForGameType());
	AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, MaximumPossibleBetsizeBecauseOfBalance());
  // Rounding to beautiful numbers (here full dollars)
  AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, RoundedBetsizeForTournaments(amount_to_raise_to));
  // Special handling for DDPoker
  // http://www.maxinmontreal.com/forums/viewtopic.php?f=120&t=19185&hilit=ddpoker
  if(p_engine_container->symbol_engine_casino()->ConnectedToDDPoker()){
    //!!?? Duplicate to ZeeZooLaas code above?
		AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, MaximumBetsizeDueToMaxOppStack());
	}
  AdaptValueToMinMaxRange(&amount_to_raise_to, 0, SwagAmountAjustedToCasino(amount_to_raise_to));
	return amount_to_raise_to; 
}
Esempio n. 2
0
double AdjustedBetsize(double amount_to_raise_to)
{
    AdaptValueToMinMaxRange(&amount_to_raise_to, MinimumBetsizeDueToPreviousRaise(), amount_to_raise_to);
    AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, MaximumBetsizeForGameType());
    AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, MaximumPossibleBetsizeBecauseOfBalance());
    AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, RoundedBetsizeForTournaments(amount_to_raise_to));
    return amount_to_raise_to;
}
double AdjustedBetsize(double amount_to_raise_to) {
	double original_amount_to_raise_to = amount_to_raise_to;
  amount_to_raise_to = RoundToBeautifulBetsize(amount_to_raise_to);
	AdaptValueToMinMaxRange(&amount_to_raise_to, MinimumBetsizeDueToPreviousRaise(), amount_to_raise_to);
	AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, MaximumBetsizeForGameType());
	AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, MaximumPossibleBetsizeBecauseOfBalance());
	AdaptValueToMinMaxRange(&amount_to_raise_to, amount_to_raise_to, RoundedBetsizeForTournaments(amount_to_raise_to));
	AdaptValueToMinMaxRange(&amount_to_raise_to, 0, SwagAmountAjustedToCasino(amount_to_raise_to));
	return amount_to_raise_to; 
}