Send state of seats at the beginning of each hand.

This commit is contained in:
lotodore
2011-12-21 20:56:41 +00:00
parent e3a30d571c
commit 38d224590a
25 changed files with 292 additions and 106 deletions
+15
View File
@@ -217,6 +217,21 @@ boost::shared_ptr<PlayerInterface> Game::getPlayerByUniqueId(unsigned id)
return tmpPlayer;
}
boost::shared_ptr<PlayerInterface> Game::getPlayerByNumber(int number)
{
boost::shared_ptr<PlayerInterface> tmpPlayer;
PlayerListIterator i = getSeatsList()->begin();
PlayerListIterator end = getSeatsList()->end();
while (i != end) {
if ((*i)->getMyID() == number) {
tmpPlayer = *i;
break;
}
++i;
}
return tmpPlayer;
}
boost::shared_ptr<PlayerInterface> Game::getCurrentPlayer()
{
boost::shared_ptr<PlayerInterface> tmpPlayer = getPlayerByUniqueId(getCurrentHand()->getCurrentBeRo()->getCurrentPlayersTurnId());
+1
View File
@@ -109,6 +109,7 @@ public:
}
boost::shared_ptr<PlayerInterface> getPlayerByUniqueId(unsigned id);
boost::shared_ptr<PlayerInterface> getPlayerByNumber(int number);
boost::shared_ptr<PlayerInterface> getPlayerByName(const std::string &name);
boost::shared_ptr<PlayerInterface> getCurrentPlayer();