Ejemplo n.º 1
0
void CEngineContainer::CallSymbolEnginesToUpdateSymbolsIfNecessary()
{
	p_betround_calculator->OnNewHeartbeat();
	p_handreset_detector->OnNewHeartbeat();
	// table-limits depend on betround
	p_tablelimits->CalcTableLimits();

	// ResetOnConnection() gets directly called by the auto-connector,
	// so we don't have to care about that.
	// We only need to care about:
	// * ResetOnHandreset()
	// * ResetOnNewRound()
	// * ResetOnMyTurn()
	if (p_handreset_detector->IsHandreset())
	{
		ResetOnHandreset();
	}
	if (p_betround_calculator->IsNewBetround())
	{
		ResetOnNewRound();
	}
	if (p_scraper_access->IsMyTurn())
	{
		ResetOnMyTurn();
	}
	// And finally ResetOnHeartbeat() gets always called.
	ResetOnHeartbeat();
}
void CSymbolEngineChipAmounts::ResetOnConnection()
{
	ResetOnHandreset();

	_maxbalance = k_undefined;
	_balanceatstartofsession = k_undefined;
}
Ejemplo n.º 3
0
void CSymbolEngineRaisersCallers::ResetOnConnection()
{
	_nchairs = p_tablemap->nchairs();
	_raischair_previous_frame = k_undefined;
	
	ResetOnHandreset();
}
Ejemplo n.º 4
0
void CTableLimits::ResetOnConnection()
{
	write_log(3, "CTableLimits::ResetOnConnection()\n");
	blinds_locked_for_complete_session = false;
	number_of_saved_tablelimits = 0;
	for (int i=0; i<k_number_of_hands_to_autolock_blinds_for_cashgames; i++)
	{
		tablelimits_first_N_hands_sblind[i] = 0;
		tablelimits_first_N_hands_bblind[i] = 0;
		tablelimits_first_N_hands_bbet[i]   = 0;
	}
	_ante = 0;
	_gametype = k_gametype_unknown;
	ResetOnHandreset();
}
Ejemplo n.º 5
0
void CEngineContainer::EvaluateAll()
{
	write_log(preferences.debug_engine_container(), "[EngineContainer] EvaluateAll()\n");
	if (!_reset_on_connection_executed)
	{
		write_log(preferences.debug_engine_container(), "[EngineContainer] Skipping as ResetOnConnection not yet executed.\n");
		write_log(preferences.debug_engine_container(), "[EngineContainer] Waiting for call by auto-connector-thread\n");
		// The problem with ResetOnConnection:
		// It will be called by another thread,
		// so the execution might be out of order.
		// Therefore we have to skip all other calculations
		// until OnConnection() got executed.
		return;
	}
	if (p_formula_parser == NULL) {
		// No formula loaded
		return;
	}
	if (p_formula_parser->IsParsing()) {
		// Not safe to evaluate anything
		return;
	}
	p_betround_calculator->OnNewHeartbeat();
	p_handreset_detector->OnNewHeartbeat();
	// table-limits depend on betround
	p_symbol_engine_tablelimits->CalcTableLimits();

	// ResetOnConnection() gets directly called by the auto-connector,
	// so we don't have to care about that.
	// We only need to care about:
	// * ResetOnHandreset()
	// * ResetOnNewRound()
	// * ResetOnMyTurn()
	if (p_handreset_detector->IsHandreset())
	{
		ResetOnHandreset();
	}
	if (p_betround_calculator->IsNewBetround())
	{
		ResetOnNewRound();
	}
	if (p_scraper_access->IsMyTurn())
	{
		ResetOnMyTurn();
	}
	// And finally ResetOnHeartbeat() gets always called.
	ResetOnHeartbeat();
}
void CSymbolEngineTableLimits::ResetOnConnection() {
	write_log(preferences.debug_table_limits(), 
    "[CSymbolEngineTableLimits] ResetOnConnection()\n");
	number_of_saved_tablelimits = 0;
	for (int i=0; i<k_number_of_hands_to_autolock_blinds_for_cashgames; i++)	{
		tablelimits_first_N_hands_sblind[i] = 0;
		tablelimits_first_N_hands_bblind[i] = 0;
		tablelimits_first_N_hands_bbet[i]   = 0;
	}
	_ante = 0;
  tablelimit_best_guess.bbet = 0;
  tablelimit_best_guess.bblind  = 0;
  tablelimit_best_guess.sblind = 0;
  tablelimit_locked_for_complete_session.bbet = 0;
  tablelimit_locked_for_complete_session.bblind = 0;
	tablelimit_locked_for_complete_session.sblind = 0;
  blinds_locked_for_complete_session = false;
  // ResetOnHandreset also cares about tablelimit_locked_for_current_hand
	ResetOnHandreset();
}
Ejemplo n.º 7
0
void CSymbolEngineRandom::ResetOnConnection()
{
	ResetOnHandreset();
}
Ejemplo n.º 8
0
void CSymbolEnginePrwin::ResetOnConnection() {
	ResetOnHandreset();
}
Ejemplo n.º 9
0
void CSymbolEngineCallers::ResetOnConnection() {
  _nchairs = p_tablemap->nchairs();
	ResetOnHandreset();
}
void CSymbolEngineHandrank::InitOnStartup()
{
	ResetOnHandreset();
}
Ejemplo n.º 11
0
void CSymbolEnginePrwin::ResetOnConnection()
{
	iter_vars.ResetVars();
	ResetOnHandreset();
}
void CSymbolEngineBlinds::ResetOnConnection()
{
	ResetOnHandreset();
}
void CSymbolEngineHistory::ResetOnConnection() {
	ResetOnHandreset();
}
void CSymbolEngineRaisersCallers::ResetOnConnection() {
	ResetOnHandreset();
}