Exemplo n.º 1
0
// Start a new record, which updates bankroll, and update table stats
void StrategyTracker::RecordNew(const Strategy *pcStrategy, const Table &cTable)
{
    // Increment sequence number
    ++m_nSequence;
    // Record current bankroll
    m_nBeginningBankroll = pcStrategy->Bankroll();
    // Record current odds multiple
    m_fOdds = pcStrategy->Odds();
    // Record Table status
    m_bTableComeOutRoll = cTable.IsComingOutRoll();
    m_nTablePoint       = cTable.Point();
}
Exemplo n.º 2
0
void Wager::BetModificationSetup(const Table &cTable, const std::list<Bet> &lBets)
{
    // If table is coming out and no modifiable bets exist, reset counter
    if (cTable.IsComingOutRoll() && !ModifiableBetsExist(lBets))  // This counts all bets  TODO: count only modifiable bets
    {
        m_nBetModCounter = 0;
    }

    // Loop through bets and find a winner
    // If found, increment by one
    m_bWon = false;

    for (std::list<Bet>::const_iterator it = lBets.begin(); it != lBets.end(); ++it)
    {
        if (it->Won())
        {
            m_bWon = true;
            break;
        }
    }
}