corrections and starting reentry development

This commit is contained in:
Albert Medela
2020-06-07 01:47:11 +02:00
parent 1e3253a18d
commit 63fb9bc287
7 changed files with 220 additions and 20 deletions
+17
View File
@@ -324,3 +324,20 @@ void Game::raiseBlinds()
currentSmallBlind = min(currentSmallBlind,startQuantityPlayers*startCash/2);
}
}
boost::shared_ptr<PlayerInterface>
Game::addNewPlayer(boost::shared_ptr<PlayerData> player)
{
// TODO (albmed): We must think how:
// also add to seatList (or replace a free slot if 10 players tops)
int i = 0; // ERROR. Thik about approppiate value (probably this should be set after a seat is found)
boost::shared_ptr<PlayerInterface> tmpPlayer = myFactory->createPlayer(i, player->GetUniqueId(), player->GetType(), player->GetName(), player->GetAvatarFile(), player->GetStartCash(), startQuantityPlayers > i, PLAYER_TYPE_HUMAN, 0);
tmpPlayer->setIsSessionActive(true); // ??? Really ???
tmpPlayer->setMyGuid(player->GetGuid());
return tmpPlayer;
}
+2
View File
@@ -142,6 +142,8 @@ public:
boost::shared_ptr<PlayerInterface> getPlayerByName(const std::string &name);
boost::shared_ptr<PlayerInterface> getCurrentPlayer();
boost::shared_ptr<PlayerInterface> addNewPlayer(boost::shared_ptr<PlayerData> player);
void raiseBlinds();
private: