session:: shared pointer game refactoring
This commit is contained in:
@@ -552,7 +552,7 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog) {
|
|||||||
//Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen
|
//Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen
|
||||||
if (mySettingsDialog->getPlayerNickIsChanged() && myStartWindow->getSession()->getCurrentGame() && !myStartWindow->getSession()->isNetworkClientRunning()) {
|
if (mySettingsDialog->getPlayerNickIsChanged() && myStartWindow->getSession()->getCurrentGame() && !myStartWindow->getSession()->isNetworkClientRunning()) {
|
||||||
|
|
||||||
Game *currentGame = myStartWindow->getSession()->getCurrentGame();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
PlayerListIterator it = currentGame->getSeatsList()->begin();
|
PlayerListIterator it = currentGame->getSeatsList()->begin();
|
||||||
(*it)->setMyName(mySettingsDialog->lineEdit_HumanPlayerName->text().toUtf8().constData());
|
(*it)->setMyName(mySettingsDialog->lineEdit_HumanPlayerName->text().toUtf8().constData());
|
||||||
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent1Name->text().toUtf8().constData());
|
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent1Name->text().toUtf8().constData());
|
||||||
@@ -571,7 +571,7 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog) {
|
|||||||
|
|
||||||
if(myStartWindow->getSession()->getCurrentGame() && !myStartWindow->getSession()->isNetworkClientRunning()) {
|
if(myStartWindow->getSession()->getCurrentGame() && !myStartWindow->getSession()->isNetworkClientRunning()) {
|
||||||
|
|
||||||
Game *currentGame = myStartWindow->getSession()->getCurrentGame();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
PlayerListIterator it = currentGame->getSeatsList()->begin();
|
PlayerListIterator it = currentGame->getSeatsList()->begin();
|
||||||
(*it)->setMyAvatar(mySettingsDialog->pushButton_HumanPlayerAvatar->getMyLink().toUtf8().constData());
|
(*it)->setMyAvatar(mySettingsDialog->pushButton_HumanPlayerAvatar->getMyLink().toUtf8().constData());
|
||||||
(*(++it))->setMyAvatar(mySettingsDialog->pushButton_Opponent1Avatar->getMyLink().toUtf8().constData());
|
(*(++it))->setMyAvatar(mySettingsDialog->pushButton_Opponent1Avatar->getMyLink().toUtf8().constData());
|
||||||
@@ -709,7 +709,7 @@ boost::shared_ptr<Session> gameTableImpl::getSession() { assert(myStartWindow->g
|
|||||||
//refresh-Funktionen
|
//refresh-Funktionen
|
||||||
void gameTableImpl::refreshSet() {
|
void gameTableImpl::refreshSet() {
|
||||||
|
|
||||||
Game *currentGame = myStartWindow->getSession()->getCurrentGame();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentGame->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
@@ -728,7 +728,7 @@ void gameTableImpl::refreshButton() {
|
|||||||
QPixmap bigblindButton = QPixmap::fromImage(QImage(myGameTableStyle->getBigBlindPuck()));
|
QPixmap bigblindButton = QPixmap::fromImage(QImage(myGameTableStyle->getBigBlindPuck()));
|
||||||
QPixmap onePix = QPixmap::fromImage(QImage(myAppDataPath +"gfx/gui/misc/1px.png"));
|
QPixmap onePix = QPixmap::fromImage(QImage(myAppDataPath +"gfx/gui/misc/1px.png"));
|
||||||
|
|
||||||
Game *currentGame = myStartWindow->getSession()->getCurrentGame();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentGame->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
@@ -782,10 +782,11 @@ void gameTableImpl::refreshButton() {
|
|||||||
void gameTableImpl::refreshPlayerName() {
|
void gameTableImpl::refreshPlayerName() {
|
||||||
|
|
||||||
if(myStartWindow->getSession()->getCurrentGame()) {
|
if(myStartWindow->getSession()->getCurrentGame()) {
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
|
||||||
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentHand->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||||
if((*it_c)->getMyActiveStatus()) {
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
|
||||||
@@ -825,18 +826,18 @@ void gameTableImpl::refreshPlayerAvatar() {
|
|||||||
|
|
||||||
QPixmap onePix = QPixmap::fromImage(QImage(myAppDataPath +"gfx/gui/misc/1px.png"));
|
QPixmap onePix = QPixmap::fromImage(QImage(myAppDataPath +"gfx/gui/misc/1px.png"));
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
int seatPlace;
|
int seatPlace;
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentHand->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
for (it_c=seatsList->begin(), seatPlace=0; it_c!=seatsList->end(); it_c++, seatPlace++) {
|
for (it_c=seatsList->begin(), seatPlace=0; it_c!=seatsList->end(); it_c++, seatPlace++) {
|
||||||
|
|
||||||
QString countryString(QString(myStartWindow->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).countryCode.c_str()).toLower());
|
QString countryString(QString(myStartWindow->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).countryCode.c_str()).toLower());
|
||||||
countryString = QString(":/cflags/cflags/%1.png").arg(countryString);
|
countryString = QString(":/cflags/cflags/%1.png").arg(countryString);
|
||||||
|
|
||||||
if((*it_c)->getMyActiveStatus()) {
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
|
||||||
QFile myAvatarFile(QString::fromUtf8((*it_c)->getMyAvatar().c_str()));
|
QFile myAvatarFile(QString::fromUtf8((*it_c)->getMyAvatar().c_str()));
|
||||||
if((*it_c)->getMyAvatar() == "" || !myAvatarFile.exists()) {
|
if((*it_c)->getMyAvatar() == "" || !myAvatarFile.exists()) {
|
||||||
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(QPixmap::fromImage(QImage(myGameTableStyle->getDefaultAvatar())),countryString,seatPlace);
|
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(QPixmap::fromImage(QImage(myGameTableStyle->getDefaultAvatar())),countryString,seatPlace);
|
||||||
}
|
}
|
||||||
@@ -847,7 +848,7 @@ void gameTableImpl::refreshPlayerAvatar() {
|
|||||||
else {
|
else {
|
||||||
if((myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET || myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_NETWORK)) {
|
if((myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET || myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_NETWORK)) {
|
||||||
if((*it_c)->getMyStayOnTableStatus() == TRUE && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER) {
|
if((*it_c)->getMyStayOnTableStatus() == TRUE && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER) {
|
||||||
QFile myAvatarFile(QString::fromUtf8((*it_c)->getMyAvatar().c_str()));
|
QFile myAvatarFile(QString::fromUtf8((*it_c)->getMyAvatar().c_str()));
|
||||||
if((*it_c)->getMyAvatar() == "" || !myAvatarFile.exists()) {
|
if((*it_c)->getMyAvatar() == "" || !myAvatarFile.exists()) {
|
||||||
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(QPixmap::fromImage(QImage(myGameTableStyle->getDefaultAvatar())), countryString, seatPlace, TRUE);
|
playerAvatarLabelArray[(*it_c)->getMyID()]->setPixmapAndCountry(QPixmap::fromImage(QImage(myGameTableStyle->getDefaultAvatar())), countryString, seatPlace, TRUE);
|
||||||
}
|
}
|
||||||
@@ -895,12 +896,12 @@ void gameTableImpl::refreshAction(int playerID, int playerAction) {
|
|||||||
QStringList actionArray;
|
QStringList actionArray;
|
||||||
actionArray << "" << "fold" << "check" << "call" << "bet" << "raise" << "allin";
|
actionArray << "" << "fold" << "check" << "call" << "bet" << "raise" << "allin";
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
if(playerID == -1 || playerAction == -1) {
|
if(playerID == -1 || playerAction == -1) {
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentHand->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||||
|
|
||||||
//if no action --> clear Pixmap
|
//if no action --> clear Pixmap
|
||||||
@@ -952,10 +953,10 @@ void gameTableImpl::refreshAction(int playerID, int playerAction) {
|
|||||||
|
|
||||||
void gameTableImpl::refreshCash() {
|
void gameTableImpl::refreshCash() {
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentHand->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||||
if((*it_c)->getMyActiveStatus()) {
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
|
||||||
@@ -973,9 +974,9 @@ void gameTableImpl::refreshGroupbox(int playerID, int status) {
|
|||||||
|
|
||||||
if(playerID == -1 || status == -1) {
|
if(playerID == -1 || status == -1) {
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentHand->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||||
|
|
||||||
if((*it_c)->getMyTurn()) {
|
if((*it_c)->getMyTurn()) {
|
||||||
@@ -1084,9 +1085,9 @@ void gameTableImpl::refreshAll() {
|
|||||||
refreshSet();
|
refreshSet();
|
||||||
refreshButton();
|
refreshButton();
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentHand->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||||
refreshAction( (*it_c)->getMyID(), (*it_c)->getMyAction());
|
refreshAction( (*it_c)->getMyID(), (*it_c)->getMyAction());
|
||||||
}
|
}
|
||||||
@@ -1101,9 +1102,9 @@ void gameTableImpl::refreshChangePlayer() {
|
|||||||
|
|
||||||
refreshSet();
|
refreshSet();
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentHand->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
for (it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
|
||||||
refreshAction( (*it_c)->getMyID(), (*it_c)->getMyAction());
|
refreshAction( (*it_c)->getMyID(), (*it_c)->getMyAction());
|
||||||
}
|
}
|
||||||
@@ -1144,7 +1145,7 @@ void gameTableImpl::dealHoleCards() {
|
|||||||
|
|
||||||
// Karten der Gegner und eigene Karten austeilen
|
// Karten der Gegner und eigene Karten austeilen
|
||||||
int j;
|
int j;
|
||||||
Game *currentGame = myStartWindow->getSession()->getCurrentGame();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatsList = currentGame->getSeatsList();
|
PlayerList seatsList = currentGame->getSeatsList();
|
||||||
@@ -1381,11 +1382,9 @@ void gameTableImpl::provideMyActions(int mode) {
|
|||||||
QString pushButtonAllInString;
|
QString pushButtonAllInString;
|
||||||
QString lastPushButtonCallCheckString = pushButton_CallCheck->text();
|
QString lastPushButtonCallCheckString = pushButton_CallCheck->text();
|
||||||
|
|
||||||
|
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||||
Game *currentGame = myStartWindow->getSession()->getCurrentGame();
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = currentGame->getCurrentHand();
|
|
||||||
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
||||||
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
||||||
|
|
||||||
//really disabled buttons if human player is fold/all-in or ... and not called from dealberocards
|
//really disabled buttons if human player is fold/all-in or ... and not called from dealberocards
|
||||||
if(/*pushButton_BetRaise->isCheckable() && */mode != 0 && (humanPlayer->getMyAction() == PLAYER_ACTION_ALLIN || humanPlayer->getMyAction() == PLAYER_ACTION_FOLD || (humanPlayer->getMySet() == currentHand->getCurrentBeRo()->getHighestSet() && (humanPlayer->getMyAction() != PLAYER_ACTION_NONE)))) {
|
if(/*pushButton_BetRaise->isCheckable() && */mode != 0 && (humanPlayer->getMyAction() == PLAYER_ACTION_ALLIN || humanPlayer->getMyAction() == PLAYER_ACTION_FOLD || (humanPlayer->getMySet() == currentHand->getCurrentBeRo()->getHighestSet() && (humanPlayer->getMyAction() != PLAYER_ACTION_NONE)))) {
|
||||||
@@ -2069,13 +2068,13 @@ void gameTableImpl::postRiverRunAnimation2() {
|
|||||||
horizontalSlider_bet->setDisabled(TRUE);
|
horizontalSlider_bet->setDisabled(TRUE);
|
||||||
spinBox_betValue->setDisabled(TRUE);
|
spinBox_betValue->setDisabled(TRUE);
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
bool internetOrNetworkGame = (myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET || myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_NETWORK);
|
bool internetOrNetworkGame = (myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET || myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_NETWORK);
|
||||||
|
|
||||||
int nonfoldPlayersCounter = 0;
|
int nonfoldPlayersCounter = 0;
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||||
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD)
|
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD)
|
||||||
nonfoldPlayersCounter++;
|
nonfoldPlayersCounter++;
|
||||||
@@ -2390,13 +2389,13 @@ void gameTableImpl::showHoleCards(unsigned playerId, bool allIn)
|
|||||||
|
|
||||||
void gameTableImpl::flipHolecardsAllIn() {
|
void gameTableImpl::flipHolecardsAllIn() {
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myStartWindow->getSession()->getCurrentGame();
|
||||||
|
|
||||||
if(!flipHolecardsAllInAlreadyDone) {
|
if(!flipHolecardsAllInAlreadyDone) {
|
||||||
//Aktive Spieler zählen --> wenn nur noch einer nicht-folded dann keine Karten umdrehen
|
//Aktive Spieler zählen --> wenn nur noch einer nicht-folded dann keine Karten umdrehen
|
||||||
int nonfoldPlayersCounter = 0;
|
int nonfoldPlayersCounter = 0;
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||||
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) nonfoldPlayersCounter++;
|
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) nonfoldPlayersCounter++;
|
||||||
}
|
}
|
||||||
@@ -2908,14 +2907,14 @@ void gameTableImpl::mouseOverFlipCards(bool front) {
|
|||||||
|
|
||||||
void gameTableImpl::updateMyButtonsState(int mode) {
|
void gameTableImpl::updateMyButtonsState(int mode) {
|
||||||
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||||
|
|
||||||
if(currentHand->getLastPlayersTurn() == 0) {
|
if(currentHand->getLastPlayersTurn() == 0) {
|
||||||
myButtonsCheckable(FALSE);
|
myButtonsCheckable(FALSE);
|
||||||
clearMyButtons();
|
clearMyButtons();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(myStartWindow->getSession()->getCurrentGame()->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_ALLIN) { // dont show pre-actions after flip cards when allin
|
if(currentHand->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_ALLIN) { // dont show pre-actions after flip cards when allin
|
||||||
myButtonsCheckable(TRUE);
|
myButtonsCheckable(TRUE);
|
||||||
provideMyActions(mode);
|
provideMyActions(mode);
|
||||||
}
|
}
|
||||||
@@ -2951,8 +2950,7 @@ void gameTableImpl::clearMyButtons() {
|
|||||||
|
|
||||||
void gameTableImpl::myButtonsCheckable(bool state) {
|
void gameTableImpl::myButtonsCheckable(bool state) {
|
||||||
|
|
||||||
Game *currentGame = myStartWindow->getSession()->getCurrentGame();
|
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||||
boost::shared_ptr<HandInterface> currentHand = currentGame->getCurrentHand();
|
|
||||||
|
|
||||||
if(state) {
|
if(state) {
|
||||||
//checkable
|
//checkable
|
||||||
|
|||||||
@@ -394,8 +394,8 @@ void guiLog::logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString b
|
|||||||
logFileStreamString += bbName+" ($"+QString::number(bbSet,10)+")";
|
logFileStreamString += bbName+" ($"+QString::number(bbSet,10)+")";
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
boost::shared_ptr<HandInterface> currentHand = myW->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myW->getSession()->getCurrentGame();
|
||||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||||
|
|
||||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||||
|
|
||||||
@@ -1543,9 +1543,9 @@ QString guiLog::determineHandName(int myCardsValueInt) {
|
|||||||
list<int> sameHandCardsValueInt;
|
list<int> sameHandCardsValueInt;
|
||||||
bool different = false;
|
bool different = false;
|
||||||
bool equal = false;
|
bool equal = false;
|
||||||
boost::shared_ptr<HandInterface> currentHand = myW->getSession()->getCurrentGame()->getCurrentHand();
|
boost::shared_ptr<Game> currentGame = myW->getSession()->getCurrentGame();
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
||||||
|
|
||||||
// collect cardsValueInt of all players who will show their cards
|
// collect cardsValueInt of all players who will show their cards
|
||||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
|||||||
//only active players are allowed to start a vote
|
//only active players are allowed to start a vote
|
||||||
if(humanPlayer->getMyActiveStatus()) {
|
if(humanPlayer->getMyActiveStatus()) {
|
||||||
|
|
||||||
Game *currentGame = myW->getSession()->getCurrentGame();
|
boost::shared_ptr<Game> currentGame = myW->getSession()->getCurrentGame();
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
int activePlayerCounter=0;
|
int activePlayerCounter=0;
|
||||||
PlayerList seatList = currentGame->getSeatsList();
|
PlayerList seatList = currentGame->getSeatsList();
|
||||||
@@ -204,7 +204,7 @@ void MyAvatarLabel::putPlayerOnIgnoreList() {
|
|||||||
|
|
||||||
void MyAvatarLabel::reportBadAvatar() {
|
void MyAvatarLabel::reportBadAvatar() {
|
||||||
|
|
||||||
Game *currentGame = myW->getSession()->getCurrentGame();
|
boost::shared_ptr<Game> currentGame = myW->getSession()->getCurrentGame();
|
||||||
int j=0;
|
int j=0;
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
PlayerList seatList = currentGame->getSeatsList();
|
PlayerList seatList = currentGame->getSeatsList();
|
||||||
|
|||||||
+2
-2
@@ -135,9 +135,9 @@ void Session::startClientGame(boost::shared_ptr<Game> game)
|
|||||||
currentGame = game;
|
currentGame = game;
|
||||||
}
|
}
|
||||||
|
|
||||||
Game *Session::getCurrentGame()
|
boost::shared_ptr<Game> Session::getCurrentGame()
|
||||||
{
|
{
|
||||||
return currentGame.get();
|
return currentGame;
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiInterface *Session::getGui()
|
GuiInterface *Session::getGui()
|
||||||
|
|||||||
+2
-1
@@ -58,7 +58,8 @@ public:
|
|||||||
void startLocalGame(const GameData &gameData, const StartData &startData);
|
void startLocalGame(const GameData &gameData, const StartData &startData);
|
||||||
void startClientGame(boost::shared_ptr<Game> game);
|
void startClientGame(boost::shared_ptr<Game> game);
|
||||||
|
|
||||||
Game *getCurrentGame();
|
boost::shared_ptr<Game> getCurrentGame();
|
||||||
|
|
||||||
GuiInterface *getGui();
|
GuiInterface *getGui();
|
||||||
Log* getMyLog() {return myLog; }
|
Log* getMyLog() {return myLog; }
|
||||||
GameType getGameType();
|
GameType getGameType();
|
||||||
|
|||||||
Reference in New Issue
Block a user