show cards button gui action hopefully implemented ;-)
This commit is contained in:
+4501
-4491
File diff suppressed because it is too large
Load Diff
@@ -178,8 +178,8 @@ public:
|
||||
|
||||
void setNetSessionData(boost::shared_ptr<SessionData> session);
|
||||
boost::shared_ptr<SessionData> getNetSessionData();
|
||||
|
||||
|
||||
bool checkIfINeedToShowCards();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -515,3 +515,13 @@ boost::shared_ptr<SessionData> ClientPlayer::getNetSessionData()
|
||||
return myNetSessionData;
|
||||
}
|
||||
|
||||
bool ClientPlayer::checkIfINeedToShowCards()
|
||||
{
|
||||
std::list<unsigned> playerNeedToShowCardsList = currentBoard->getPlayerNeedToShowCards();
|
||||
for(std::list<unsigned>::iterator it = playerNeedToShowCardsList.begin(); it != playerNeedToShowCardsList.end(); it++)
|
||||
{
|
||||
if(*it == myUniqueID) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -181,6 +181,8 @@ private:
|
||||
bool myWinnerState;
|
||||
|
||||
boost::shared_ptr<SessionData> myNetSessionData;
|
||||
|
||||
bool checkIfINeedToShowCards();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -115,6 +115,8 @@ public:
|
||||
|
||||
virtual void setNetSessionData(boost::shared_ptr<SessionData> session) =0;
|
||||
virtual boost::shared_ptr<SessionData> getNetSessionData() =0;
|
||||
|
||||
virtual bool checkIfINeedToShowCards() =0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user