First try of showing cards when everybody is all in.

This commit is contained in:
lotodore
2007-06-06 21:16:52 +00:00
parent e6305092ea
commit 8a22157cbd
8 changed files with 143 additions and 69 deletions
+24
View File
@@ -700,6 +700,30 @@ ClientStateRunHand::InternalProcess(ClientThread &client, boost::shared_ptr<NetP
curGame->getCurrentHand()->getBoard()->setMyCards(tmpCards);
client.GetGui().dealRiverCard();
}
else if (packet->ToNetPacketAllInShowCards())
{
NetPacketAllInShowCards::Data allInData;
packet->ToNetPacketAllInShowCards()->GetData(allInData);
NetPacketAllInShowCards::PlayerCardsList::const_iterator i
= allInData.playerCards.begin();
NetPacketAllInShowCards::PlayerCardsList::const_iterator end
= allInData.playerCards.end();
while (i != end)
{
PlayerInterface *tmpPlayer = curGame->getPlayerByUniqueId((*i).playerId);
if (!tmpPlayer)
throw ClientException(ERR_NET_UNKNOWN_PLAYER_ID, 0);
int tmpCards[2];
tmpCards[0] = static_cast<int>((*i).cards[0]);
tmpCards[1] = static_cast<int>((*i).cards[1]);
tmpPlayer->setMyCards(tmpCards);
++i;
}
client.GetGui().flipHolecardsAllIn();
}
else if (packet->ToNetPacketEndOfHandHideCards())
{
// End of Hand, but keep cards hidden.