double CTableLimits::GuessBigBetFromBigBlind() { write_log(3, "CTableLimits::GuessBigBetFromBigBlind()\n"); if ((gametype() == k_gametype_NL) || (gametype() == k_gametype_PL)) { write_log(3, "CTableLimits::GuessBigBetFromBigBlind() BB = bb\n"); return (tablelimit_unreliable_input.bblind); } else { write_log(3, "CTableLimits::GuessBigBetFromBigBlind() BB = 2*bb\n"); return (tablelimit_unreliable_input.bblind*2); } }
QString Dialog::prepareWhoisUrl() { qDebug("[Dialog::prepareWhoisUrl]"); if (m_ui->serverIpLineEdit->text().isEmpty()) { return QString(); } QString url("http://"); url += m_ui->serverIpLineEdit->text(); url += ":" + m_ui->portLineEdit->text(); url += gametype(); // add params url += "?"; bool firstElement = true; if (!m_ui->playerNickLineEdit->text().isEmpty()) { if (firstElement) { firstElement = false; } else { url += "&"; } url += "nick=" + m_ui->playerNickLineEdit->text(); } qDebug() << "[Dialog::prepareWhoisUrl] url is: " << url; return url; }
double CTableLimits::GuessBigBlindFromSmallBlind() { // Special cases: NL 0.10/0.25. // Some casinos do also provide NL 0.10/0.20, // but that is rare, we do assume 0.10/0.25 here. write_log(3, "CTableLimits::GuessBigBlindFromSmallBlind()\n"); if (gametype() == k_gametype_NL && IsEqual(tablelimit_unreliable_input.sblind, 0.10)) { return 0.25; } return (tablelimit_unreliable_input.sblind * 2); }
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(); }