예제 #1
0
//
// ApplyConventionTests()
//
BOOL CConventionSet::ApplyConventionTests(const CPlayer& player, CHandHoldings& hand, CCardLocation& cardLocation, CGuessedHandHoldings** ppGuessedHands, CBidEngine& bidState, CPlayerStatusDialog& status) 
{
	if (m_listConventions.IsEmpty()) 
		return FALSE;
	//
	POSITION pos = m_listConventions.GetHeadPosition();
	CConvention* pConvention = m_listConventions.GetNext(pos);
	while(pConvention)
	{
		if (pConvention->ApplyTest(player, *this, hand, cardLocation, ppGuessedHands, bidState, status))
			return TRUE;
		if (pos)
			pConvention = m_listConventions.GetNext(pos);
		else
			pConvention = NULL;
	}
	//
	return FALSE;
}
예제 #2
0
//
// ApplyConventionTests()
//
BOOL CConventionSet::ApplyConventionTests(const CPlayer& player, CHandHoldings& hand, CCardLocation& cardLocation, CGuessedHandHoldings** ppGuessedHands, CBidEngine& bidState, CPlayerStatusDialog& status) 
{
	if (m_listConventions.IsEmpty()) 
		return FALSE;
	//
	POSITION pos = m_listConventions.GetHeadPosition();
	CConvention* pConvention = m_listConventions.GetNext(pos);
	while(pConvention)
	{
		if (pConvention->ApplyTest(player, *this, hand, cardLocation, ppGuessedHands, bidState, status)) { // NCR-SCU
#ifdef _DEBUG
			CEasyBDoc::m_pDoc->AddSCU(pConvention->m_nID); // NCR-SCU add this convention's id
#endif
			return TRUE;
		} // end NCR-SCU
		if (pos)
			pConvention = m_listConventions.GetNext(pos);
		else
			pConvention = NULL;
	}
	//
	return FALSE;
}