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
+4 -3
View File
@@ -657,8 +657,9 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
}
// Set dealer pos.
StartData startData;
Tools myTool;
myTool.getRandNumber(0, gameData.numberOfPlayers-1, 1, &startData.startDealerPos, 0);
int tmpDealerPos = 0;
Tools::getRandNumber(0, gameData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos);
//Start Game!!!
mySession->startLocalGame(gameData, startData);
@@ -1188,7 +1189,7 @@ void mainWindowImpl::dealHoleCards() {
currentGame->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
for(j=0; j<2; j++) {
if(currentGame->getPlayerArray()[i]->getMyActiveStatus()) {
if ((i == currentGame->getGuiPlayerNum()) || debugMode) {
if ((i == 0) || debugMode) {
tempCardsPixmapArray[j].load(":/cards/resources/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png");
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j],FALSE);