本文整理汇总了C++中Base::AsString方法的典型用法代码示例。如果您正苦于以下问题:C++ Base::AsString方法的具体用法?C++ Base::AsString怎么用?C++ Base::AsString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base::AsString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowCommunityCardMessage
// Show a dealer chat message for community cards
void ShowCommunityCardMessage(Player* pCommunity)
{
#ifdef PCLIENT_MODULE_
CChatView* pChat = CChatView::Instance();
if (pChat)
{
CString s;
// Add a message to the chat window
if (pCommunity->numCards() == 3)
{ // Flop was dealt
CString s1, s2, s3;
Card c1, c2, c3;
pCommunity->getCard(0, c1);
pCommunity->getCard(1, c2);
pCommunity->getCard(2, c3);
s1 = AsString(c1);
s2 = AsString(c2);
s3 = AsString(c3);
s.Format("Flop is %s, %s, %s",
(LPCTSTR)s1, (LPCTSTR)s2, (LPCTSTR)s3);
}
else if (pCommunity->numCards() == 4)
{
CString s1;
Card c;
pCommunity->getCard(3, c);
s1 = AsString(c);
s.Format("Turn is %s", (LPCTSTR)s1);
}
else if (pCommunity->numCards() == 5)
{
CString s1;
Card c;
pCommunity->getCard(4, c);
s1 = AsString(c);
s.Format("River is %s", (LPCTSTR)s1);
}
if (!s.IsEmpty())
{
pChat->addDealerMessage(s, CChatView::CF_GameNormal);
}
}
#endif
}