Tools - random number function is now static. Fixed player number issue with network games (GUI player number needs to be 0), this still requires some work.

This commit is contained in:
lotodore
2007-05-21 19:00:06 +00:00
parent 3ede810baa
commit 2ce67297ee
17 changed files with 129 additions and 100 deletions
+17 -4
View File
@@ -35,8 +35,8 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
startQuantityPlayers(gameData.numberOfPlayers),
startCash(gameData.startCash), startSmallBlind(gameData.smallBlind),
startHandsBeforeRaiseSmallBlind(gameData.handsBeforeRaise),
myGameID(gameId), guiPlayerNum(gameData.guiPlayerNum), actualQuantityPlayers(gameData.numberOfPlayers),
actualSmallBlind(gameData.smallBlind), actualHandID(0), dealerPosition(startData.startDealerPos)
myGameID(gameId), actualQuantityPlayers(gameData.numberOfPlayers),
actualSmallBlind(gameData.smallBlind), actualHandID(0), dealerPosition(0)
{
// cout << "Create Game Object" << "\n";
int i;
@@ -47,14 +47,27 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
playerArray[i] = 0;
}
// Dealer Position bestimmen
PlayerDataList::const_iterator player_i = playerDataList.begin();
PlayerDataList::const_iterator player_end = playerDataList.end();
while (player_i != player_end)
{
if ((*player_i)->GetUniqueId() == startData.startDealerPlayerId)
{
dealerPosition = (*player_i)->GetNumber();
break;
}
++player_i;
}
// Board erstellen
actualBoard = myFactory->createBoard();
// Player erstellen
PlayerDataList::const_iterator player_i = playerDataList.begin();
PlayerDataList::const_iterator player_end = playerDataList.end();
player_i = playerDataList.begin();
player_end = playerDataList.end();
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
string myName;