本文整理汇总了C++中Base::Card方法的典型用法代码示例。如果您正苦于以下问题:C++ Base::Card方法的具体用法?C++ Base::Card怎么用?C++ Base::Card使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base::Card方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
void PDUShowdown::execute(Base::GameState*)
{
CTableView* pView = CTableView::Instance();
if (pView)
{
Player* pPlayer = pView->getPlayer(player_);
if (pPlayer)
{
if (num_cards_ == 0)
{ //
// Player mucks hand - do muck hand animation
// unless its the local player
//
if (!pView->isLocalPlayer(player_))
{
pView->InvalidateRect(pPlayer->getCardPaintArea(Player::AllCards));
pPlayer->empty();
GameLogic::Instance().setNextState(
new StateShowdown(player_, pPlayer->numCards()));
}
}
else
{ //
// Show player's cards
//
pView->InvalidateRect(pPlayer->getCardPaintArea(Player::AllCards));
CardEntry* pC = pCards_;
for (int i = 0; i < num_cards_; i++, pC++)
pPlayer->setCard(i, Card((Base::Suit)pC->suit_, pC->value_));
pPlayer->setShowAll(TRUE);
}
pView->InvalidateRect(
pPlayer->getCardPaintArea(Player::AllCards));
if (message_)
pPlayer->setActionText(message_);
else
pPlayer->setActionText("");
}
}
}