コード例 #1
0
void CSymbolEngineTableLimits::ResetOnHeartbeat() {
	write_log(preferences.debug_table_limits(), 
    "[CSymbolEngineTableLimits] ResetOnHeartbeat()\n");
  if (TableLimitsNeedToBeComputed()) {
    CBlindGuesser _blind_guesser;
    _blind_guesser.Guess(&tablelimit_best_guess.sblind,
      &tablelimit_best_guess.bblind,
      &tablelimit_best_guess.bbet);
    if (p_table_state->_s_limit_info.ante() > 0) {
      _ante = p_table_state->_s_limit_info.ante();
    }
    AutoLockBlinds();
  }
}
コード例 #2
0
void CSymbolEngineTableLimits::ResetOnHeartbeat() {
	write_log(preferences.debug_table_limits(), 
    "[CSymbolEngineTableLimits] ResetOnHeartbeat()\n");
  if (TableLimitsNeedToBeComputed()) {
    CBlindGuesser _blind_guesser;
    _blind_guesser.Guess(&tablelimit_best_guess.sblind,
      &tablelimit_best_guess.bblind,
      &tablelimit_best_guess.bbet);
    if (p_table_state->_s_limit_info.ante() > 0) {
      if (p_table_state->_s_limit_info.ante() >= sblind()) {
        write_log(preferences.debug_table_limits(), 
          "[CSymbolEngineTableLimits] ERROR: ante larger than small blind\n");
        _ante = kUndefinedZero;
      } else {
        _ante = p_table_state->_s_limit_info.ante();
      }
    }
    AutoLockBlinds();
  }
}
コード例 #3
0
void CTableLimits::CalcTableLimits()
{
	// This is basically the old function CSymbols::CalcStakes()
	// with some extension at the end to auto-lock the blinds,
	// if the values are reasonable.
	write_log(3, "CTableLimits::CalcTableLimits()\n");
	if (!IsCalculationNeccessary())
	{
		return;
	}
	SetSmallBlind(0);
	SetBigBlind(0);
	SetBigBet(0);
	SetAnte(0);

	// Save the parts we scraped successfully
	if (p_scraper->s_limit_info()->found_sblind)
		SetSmallBlind(p_scraper->s_limit_info()->sblind);								// sblind
	if (p_scraper->s_limit_info()->found_bblind)
		SetBigBlind(p_scraper->s_limit_info()->bblind);									// bblind
	if (p_scraper->s_limit_info()->found_ante)
		SetAnte(p_scraper->s_limit_info()->ante);										// ante
	if (p_scraper->s_limit_info()->found_limit)
		SetGametype(p_scraper->s_limit_info()->limit);									// lim
	if (p_scraper->s_limit_info()->found_bbet)
		SetBigBet(p_scraper->s_limit_info()->bbet);
	_istournament = p_scraper->s_limit_info()->istournament;	

	write_log(3, "CTableLimits: input from scraper: small blind: %f\n", tablelimit_unreliable_input.sblind);
	write_log(3, "CTableLimits: input from scraper: big blind:   %f\n", tablelimit_unreliable_input.bblind);
	write_log(3, "CTableLimits: input from scraper: big bet:     %f\n", tablelimit_unreliable_input.bbet);
	write_log(3, "CTableLimits: input from scraper: gametype:    %d\n", _gametype);             
	// Figure out bb/sb based on game type
	if (gametype() == k_gametype_NL || gametype() == k_gametype_PL)
	{
		CalcTableLimits_NL_PL();
	}
	else if (gametype() == k_gametype_FL || gametype() == k_gametype_unknown)
	{
		CalcTableLimits_FL_AndUnknownGametype();
	}

	// if we still do not have blinds, then infer them from the posted bets
	if (p_betround_calculator->betround() == k_betround_preflop && (tablelimit_unreliable_input.sblind==0 || tablelimit_unreliable_input.bblind==0))
	{
		SearchTableForSbAndBbValue();			
	}

	write_log(3, "CTableLimits: calculated result: small blind: %f\n", tablelimit_unreliable_input.sblind);
	write_log(3, "CTableLimits: calculated result: big blind:   %f\n", tablelimit_unreliable_input.bblind);
	write_log(3, "CTableLimits: calculated result: big bet:     %f\n", tablelimit_unreliable_input.bbet);
	AdjustForReasonableness();
	write_log(3, "CTableLimits: adjusted result: small blind: %f\n", tablelimit_unreliable_input.sblind);
	write_log(3, "CTableLimits: adjusted result: big blind:   %f\n", tablelimit_unreliable_input.bblind);
	write_log(3, "CTableLimits: adjusted result: big bet:     %f\n", tablelimit_unreliable_input.bbet);

	AcceptNewValuesIfGood();
	AutoLockBlinds();
	// Calc miminum betsizes for every streeet (after! we have potentially locked the blinds)
	CalcBetsizesForEveryStreet();
}