bool CHandresetDetector::IsHandresetByDealerChair() {
	bool ishandreset = (dealerchair != last_dealerchair)
    && IsValidDealerChair(dealerchair)
    && IsValidDealerChair(last_dealerchair);
	write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Handreset by dealerchair: %s\n",
		Bool2CString(ishandreset));
	return ishandreset;
}
Beispiel #2
0
void CHandresetDetector::GetNewSymbolValues()
{
	assert(p_symbol_engine_dealerchair != NULL);
	if (IsValidDealerChair(p_symbol_engine_dealerchair->dealerchair()))
	{
		dealerchair = p_symbol_engine_dealerchair->dealerchair();	
		write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Setting new dealerchair to [%i]\n", dealerchair);
	}
	if (IsValidHandNumber(p_scraper->s_limit_info()->handnumber))
	{
		write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Setting handnumber to [%s]\n", handnumber);
		handnumber = p_scraper->s_limit_info()->handnumber;	
	}
	else
	{
		write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Setting handnumber to [%s] was skipped. Reason: [digits number not in range]\n", handnumber);
	}
	assert(p_symbol_engine_userchair != NULL);
	int userchair = (int) p_symbol_engine_userchair->userchair();
	for (int i=0; i<k_number_of_cards_per_player; i++)
	{
		if ((userchair >= 0) && (userchair < p_tablemap->nchairs()))
		{
			playercards[i] = p_scraper->card_player(userchair, i);
		}
		else
		{
			playercards[i] = CARD_NOCARD;
		}
	}
}
void CHandresetDetector::GetNewSymbolValues() {
	assert(p_symbol_engine_dealerchair != NULL);
	if (IsValidDealerChair(p_symbol_engine_dealerchair->dealerchair()))	{
		dealerchair = p_symbol_engine_dealerchair->dealerchair();	
		write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Setting new dealerchair to [%i]\n", dealerchair);
	}
	if (IsValidHandNumber(p_table_state->_s_limit_info.handnumber()))	{
		write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Setting handnumber to [%s]\n", handnumber);
		handnumber = p_table_state->_s_limit_info.handnumber();	
	}	else {
		write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Setting handnumber to [%s] was skipped. Reason: [digits number not in range]\n", handnumber);
	}
	assert(p_symbol_engine_userchair != NULL);
	int userchair = p_symbol_engine_userchair->userchair();
  _potsize = p_symbol_engine_chip_amounts->pot();
  _community_cards = p_scraper_access->NumberOfCommonCards();
  _nopponentsplaying = p_symbol_engine_active_dealt_playing->nopponentsplaying();
  _bblind = p_symbol_engine_tablelimits->bblind();
	for (int i=0; i<k_number_of_cards_per_player; i++) {
		if ((userchair >= 0) && (userchair < p_tablemap->nchairs())) {
      playercards[i] = p_table_state->_players[userchair]._hole_cards[i].GetValue();
		} else {
			playercards[i] = CARD_UNDEFINED;
		}
	}
  for (int i=0; i<k_max_number_of_players; ++i) {
    _balance[i] = p_table_state->_players[i]._balance;
  }
}
Beispiel #4
0
bool CHandresetDetector::IsHandresetByDealerChair()
{
	if ((HandResetMethod() &  HANDRESET_DEALER) == 0)
	{
		// We don't want to use this method
		return false;
	}
	return (IsValidDealerChair(dealerchair) && (dealerchair != last_dealerchair));
}
Beispiel #5
0
bool CHandresetDetector::IsHandresetByDealerChair()
{
	if ((HandResetMethod() &  HANDRESET_DEALER) == 0)
	{
		write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] No handreset by dealerchair, because that method is not active\n");
		// We don't want to use this method
		return false;
	}
	bool ishandreset = (IsValidDealerChair(dealerchair) && (dealerchair != last_dealerchair));
	write_log(preferences.debug_handreset_detector(), "[CHandresetDetector] Handreset by dealerchair: %s\n",
		Bool2CString(ishandreset));
	return ishandreset;
}
Beispiel #6
0
void CHandresetDetector::OnNewHeartbeat()
{
	// Store old values...
	last_dealerchair = dealerchair;
	for (int i=0; i<k_number_of_cards_per_player; i++)
	{
		last_playercards[i] = playercards[i];
	}
	last_handnumber = handnumber;
	// ...and set new ones (if good).
	if (IsValidDealerChair(p_symbol_engine_dealerchair->dealerchair()))
	{
		dealerchair = p_symbol_engine_dealerchair->dealerchair();	
	}
	if (IsValidHandNumber(p_scraper->s_limit_info()->handnumber))
	{
		write_log(prefs.debug_alltherest(), "Setting handnumber to [%s]\n", handnumber);
		handnumber = p_scraper->s_limit_info()->handnumber;	
	}
	else
	{
		write_log(prefs.debug_alltherest(), "Setting handnumber to [%s] was skipped. Reason: [digits number not in range]\n", handnumber);
	}
	int userchair = (int) p_symbol_engine_userchair->userchair();
	for (int i=0; i<k_number_of_cards_per_player; i++)
	{
		if ((userchair >= 0) && (userchair < p_tablemap->nchairs()))
		{
			playercards[i] = p_scraper->card_player(userchair, i);
		}
		else
		{
			playercards[i] = CARD_NOCARD;
		}
	}
}