void CSymbolEngineChipAmounts::CalculateAmountsToCallToRaise() 
{
	int	next_largest_bet = 0;
	double largest_bet = Largestbet();

	if (p_symbol_engine_userchair->userchair_confirmed()) {
		_call = largest_bet - _currentbet[USER_CHAIR];
	} else {
		_call = 0;
	}
  write_log(preferences.debug_symbolengine(),
    "[CSymbolEngineChipAmounts] call = %.2f\n", _call);
  // In case we are covered consider only the effective amount to call,
  // but onlz if our balance is reasonable.
  double balance = p_table_state->User()->_balance;
  if ((_call > balance) && (balance > 0)) {
    _call = balance;
  }
	next_largest_bet = 0;
	for (int i=0; i<p_tablemap->nchairs(); i++)
	{
		if (_currentbet[i] != largest_bet 
			&& _currentbet[i] > next_largest_bet)
		{
			next_largest_bet = _currentbet[i];
		}
	}
	_sraiprev = largest_bet - next_largest_bet;			
}
void CSymbolEngineChipAmounts::CalculateBetsToCallToRaise() 
{
	double bet = p_tablelimits->bet();
	if (bet <= 0)
	{
		return;
	}
	if (p_symbol_engine_userchair->userchair_confirmed())
	{
		_nbetstocall = _call / bet;
		_nbetstorais = _nbetstocall + 1;	
	}
	_ncallbets = Largestbet() / bet;				
	_nraisbets = _ncallbets + 1;												
}
void CSymbolEngineChipAmounts::CalculateAmountsToCallToRaise() 
{
	int	next_largest_bet = 0;
	double largest_bet = Largestbet();

	if (p_symbol_engine_userchair->userchair_confirmed())
		
	{
		_call = largest_bet - _currentbet[USER_CHAIR];
	}
	else
	{
		_call = 0;
	}

	next_largest_bet = 0;
	for (int i=0; i<p_tablemap->nchairs(); i++)
	{
		if (_currentbet[i] != largest_bet 
			&& _currentbet[i] > next_largest_bet)
		{
			next_largest_bet = _currentbet[i];
		}
	}
	_sraiprev = largest_bet - next_largest_bet;			

	if (p_symbol_engine_userchair->userchair_confirmed())
	{
		_sraimin = largest_bet + _call;
		_sraimax = _balance[USER_CHAIR] - _call;
		if (_sraimax < 0)
		{
			_sraimax = 0;
		}
	}
}
void CSymbolEngineChipAmounts::CalculateBetsToCallToRaise() {
	double bet = p_symbol_engine_tablelimits->bet();
	if (bet <= 0) {
    // Fail-safe for the case of not being connected 
    // and completely bogus input
    bet = 1.00;
	}
  double users_currentbet = 0;
	if (p_symbol_engine_userchair->userchair_confirmed())	{
		_nbetstocall = _call / bet;	
    users_currentbet = _currentbet[USER_CHAIR];
	} else {
    _nbetstocall = 0;
  }
  _nbetstorais = _nbetstocall + 1;
  assert(bet > 0.0);
  assert(users_currentbet >= 0);
  assert(_call >= 0);
  // Computation below works even without playing user,
  // which might be important for table-stats.
	_ncallbets = Largestbet() / bet;				
	_nraisbets = _ncallbets + 1;	// fixed limit
  assert(_ncallbets >= 0.0);
}