diff --git a/pokerth.pro b/pokerth.pro index cede9f95..b33104b3 100755 --- a/pokerth.pro +++ b/pokerth.pro @@ -111,8 +111,7 @@ HEADERS += src/game.h \ src/gui/qttoolsinterface.h \ src/gui/qt/qttools/qttoolswrapper.h \ src/gui/qt/qttools/qthelper/qthelper.h \ - src/gui/generic/serverguiwrapper.h \ - src/gui/generic/genericservergui.h + src/gui/generic/serverguiwrapper.h FORMS += src/gui/qt/mainwindow.ui \ src/gui/qt/aboutpokerth.ui \ src/gui/qt/connecttoserverdialog.ui \ @@ -188,8 +187,7 @@ SOURCES += src/game.cpp \ src/gui/qttoolsinterface.cpp \ src/gui/qt/qttools/qttoolswrapper.cpp \ src/gui/qt/qttools/qthelper/qthelper.cpp \ - src/gui/generic/serverguiwrapper.cpp \ - src/gui/generic/genericservergui.cpp + src/gui/generic/serverguiwrapper.cpp RESOURCES += src/gui/qt/resources.qrc TRANSLATIONS = ts/pokerth_de.ts \ ts/pokerth_es.ts \ diff --git a/src/engine/local_engine/localflop.cpp b/src/engine/local_engine/localflop.cpp index 98d89956..7911bf2b 100755 --- a/src/engine/local_engine/localflop.cpp +++ b/src/engine/local_engine/localflop.cpp @@ -69,7 +69,7 @@ void LocalFlop::flopRun() { //also gehe in Turn myHand->setActualRound(2); - //Action l�chen und ActionButtons refresh + //Action loeschen und ActionButtons refresh for(i=0; igetPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) myHand->getPlayerArray()[i]->setMyAction(0); } @@ -94,7 +94,7 @@ void LocalFlop::flopRun() { } - // n�hsten Spieler ermitteln + // naechsten Spieler ermitteln do { playersTurn = (playersTurn+1)%(MAX_NUMBER_OF_PLAYERS); } while(!(myHand->getPlayerArray()[playersTurn]->getMyActiveStatus()) || (myHand->getPlayerArray()[playersTurn]->getMyAction())==1 || (myHand->getPlayerArray()[playersTurn]->getMyAction())==6); @@ -111,24 +111,16 @@ void LocalFlop::flopRun() { // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstFlopRound = 0; } - if(myHand->getGuiInterface()->isNetworkServer()) - { - myHand->getGuiInterface()->waitForNetworkAction( - GAME_STATE_FLOP, myHand->getPlayerArray()[playersTurn]->getMyUniqueID()); + if(playersTurn == 0) { + // Wir sind dran +// cout << "actualRound " << myHand->getActualRound() << endl; +// cout << "highestSet vor meInAction " << highestSet << endl; + myHand->getGuiInterface()->meInAction(); } - else - { - if(playersTurn == 0) { - // Wir sind dran -// cout << "actualRound " << myHand->getActualRound() << endl; -// cout << "highestSet vor meInAction " << highestSet << endl; - myHand->getGuiInterface()->meInAction(); - } - else { - //Gegner sind dran -// cout << "NextPlayerSpeed3 start" << endl; - myHand->getGuiInterface()->flopAnimation2(); - } + else { + //Gegner sind dran +// cout << "NextPlayerSpeed3 start" << endl; + myHand->getGuiInterface()->flopAnimation2(); } } } diff --git a/src/engine/local_engine/localpreflop.cpp b/src/engine/local_engine/localpreflop.cpp index 06156615..ea408bf9 100755 --- a/src/engine/local_engine/localpreflop.cpp +++ b/src/engine/local_engine/localpreflop.cpp @@ -72,7 +72,7 @@ void LocalPreflop::preflopRun() { //also gehe in Flop myHand->setActualRound(1); - //Action l�chen und ActionButtons refresh + //Action loeschen und ActionButtons refresh for(i=0; igetPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) myHand->getPlayerArray()[i]->setMyAction(0); } @@ -103,22 +103,14 @@ void LocalPreflop::preflopRun() { myHand->getPlayerArray()[playersTurn]->setMyTurn(1); myHand->getGuiInterface()->refreshGroupbox(playersTurn,2); - if(myHand->getGuiInterface()->isNetworkServer()) - { - myHand->getGuiInterface()->waitForNetworkAction( - GAME_STATE_PREFLOP, myHand->getPlayerArray()[playersTurn]->getMyUniqueID()); + if(playersTurn == 0) { + // Wir sind dran + myHand->getGuiInterface()->meInAction(); } - else - { - if(playersTurn == 0) { - // Wir sind dran - myHand->getGuiInterface()->meInAction(); - } - else { - //Gegner sind dran -// cout << "NextPlayerSpeed3 start" << endl; - myHand->getGuiInterface()->preflopAnimation2(); - } + else { + //Gegner sind dran +// cout << "NextPlayerSpeed3 start" << endl; + myHand->getGuiInterface()->preflopAnimation2(); } } } diff --git a/src/engine/local_engine/localriver.cpp b/src/engine/local_engine/localriver.cpp index 7d367217..e7952f21 100755 --- a/src/engine/local_engine/localriver.cpp +++ b/src/engine/local_engine/localriver.cpp @@ -111,23 +111,15 @@ void LocalRiver::riverRun() { // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstRiverRound = 0; } - if(myHand->getGuiInterface()->isNetworkServer()) - { - myHand->getGuiInterface()->waitForNetworkAction( - GAME_STATE_RIVER, myHand->getPlayerArray()[playersTurn]->getMyUniqueID()); + if(playersTurn == 0) { + // Wir sind dran +// cout << "actualRound " << myHand->getActualRound() << endl; +// cout << "highestSet vor meInAction " << highestSet << endl; + myHand->getGuiInterface()->meInAction(); } - else - { - if(playersTurn == 0) { - // Wir sind dran -// cout << "actualRound " << myHand->getActualRound() << endl; -// cout << "highestSet vor meInAction " << highestSet << endl; - myHand->getGuiInterface()->meInAction(); - } - else { - //Gegner sind dran - myHand->getGuiInterface()->riverAnimation2(); - } + else { + //Gegner sind dran + myHand->getGuiInterface()->riverAnimation2(); } } } diff --git a/src/engine/local_engine/localturn.cpp b/src/engine/local_engine/localturn.cpp index ea581d6f..537da1a2 100755 --- a/src/engine/local_engine/localturn.cpp +++ b/src/engine/local_engine/localturn.cpp @@ -107,29 +107,21 @@ void LocalTurn::turnRun() { myHand->getPlayerArray()[playersTurn]->setMyTurn(1); myHand->getGuiInterface()->refreshGroupbox(playersTurn,2); -// cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; -// cout << "playersTurn " << playersTurn << endl; +// cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; +// cout << "playersTurn " << playersTurn << endl; // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstTurnRound = 0; } - if(myHand->getGuiInterface()->isNetworkServer()) - { - myHand->getGuiInterface()->waitForNetworkAction( - GAME_STATE_TURN, myHand->getPlayerArray()[playersTurn]->getMyUniqueID()); + if(playersTurn == 0) { + // Wir sind dran +// cout << "actualRound " << myHand->getActualRound() << endl; +// cout << "highestSet vor meInAction " << highestSet << endl; + myHand->getGuiInterface()->meInAction(); } - else - { - if(playersTurn == 0) { - // Wir sind dran -// cout << "actualRound " << myHand->getActualRound() << endl; -// cout << "highestSet vor meInAction " << highestSet << endl; - myHand->getGuiInterface()->meInAction(); - } - else { - //Gegner sind dran -// cout << "NextPlayerSpeed3 start" << endl; - myHand->getGuiInterface()->turnAnimation2(); - } + else { + //Gegner sind dran +// cout << "NextPlayerSpeed3 start" << endl; + myHand->getGuiInterface()->turnAnimation2(); } } } diff --git a/src/gui/generic/genericservergui.cpp b/src/gui/generic/genericservergui.cpp deleted file mode 100644 index beb10f64..00000000 --- a/src/gui/generic/genericservergui.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Lothar May * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#include "genericservergui.h" -#include -#include - -using namespace std; - - -GenericServerGui::GenericServerGui(ConfigFile *config) -: myConfig(config) -{ -} - - -GenericServerGui::~GenericServerGui() -{ -} - -void GenericServerGui::initGui(int speed) -{ -} - -Session &GenericServerGui::getSession() -{ - assert(mySession.get()); - return *mySession; -} - -void GenericServerGui::setSession(boost::shared_ptr session) -{ - mySession = session; -} - -void GenericServerGui::waitForNetworkAction(GameState state, unsigned uniquePlayerId) -{ - getSession().waitForNetworkServerAction(state, uniquePlayerId); -} - - -void GenericServerGui::dealHoleCards() -{ -} - -void GenericServerGui::dealFlopCards() -{ -} - -void GenericServerGui::dealTurnCard() -{ -} - -void GenericServerGui::dealRiverCard() -{ -} - -void GenericServerGui::nextPlayerAnimation() -{ -} - -void GenericServerGui::preflopAnimation1() -{ -} - -void GenericServerGui::preflopAnimation2() -{ -} - -void GenericServerGui::flopAnimation1() -{ -} - -void GenericServerGui::flopAnimation2() -{ -} - -void GenericServerGui::turnAnimation1() -{ -} - -void GenericServerGui::turnAnimation2() -{ -} - -void GenericServerGui::riverAnimation1() -{ -} - -void GenericServerGui::riverAnimation2() -{ -} - -void GenericServerGui::postRiverAnimation1() -{ -} - -void GenericServerGui::postRiverRunAnimation1() -{ -} - -void GenericServerGui::flipHolecardsAllIn() -{ -} - diff --git a/src/gui/generic/genericservergui.h b/src/gui/generic/genericservergui.h deleted file mode 100644 index 0d5ccd07..00000000 --- a/src/gui/generic/genericservergui.h +++ /dev/null @@ -1,72 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Lothar May * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef GENERICSERVERGUI_H -#define GENERICSERVERGUI_H - -#include -#include - -class Session; -class ConfigFile; - -class GenericServerGui -{ -public: - GenericServerGui(ConfigFile *config); - - ~GenericServerGui(); - - void initGui(int speed); - - Session &getSession(); - void setSession(boost::shared_ptr session); - - void waitForNetworkAction(GameState state, unsigned uniquePlayerId); - - void dealHoleCards(); - void dealFlopCards(); - void dealTurnCard(); - void dealRiverCard(); - - void nextPlayerAnimation(); - - void preflopAnimation1(); - void preflopAnimation2(); - - void flopAnimation1(); - void flopAnimation2(); - - void turnAnimation1(); - void turnAnimation2(); - - void riverAnimation1(); - void riverAnimation2(); - - void postRiverAnimation1(); - void postRiverRunAnimation1(); - - void flipHolecardsAllIn(); - -private: - - boost::shared_ptr mySession; - ConfigFile *myConfig; -}; - -#endif diff --git a/src/gui/generic/serverguiwrapper.cpp b/src/gui/generic/serverguiwrapper.cpp index 6ee124c6..aefeb2ca 100644 --- a/src/gui/generic/serverguiwrapper.cpp +++ b/src/gui/generic/serverguiwrapper.cpp @@ -18,16 +18,15 @@ ***************************************************************************/ #include "serverguiwrapper.h" -#include "genericservergui.h" +#include using namespace std; ServerGuiWrapper::ServerGuiWrapper(ConfigFile *config, ClientCallback *clientcb, ServerCallback *servercb) -: myClientcb(clientcb), myServercb(servercb) +: myConfig(config), myClientcb(clientcb), myServercb(servercb) { - myGui.reset(new GenericServerGui(config)); } ServerGuiWrapper::~ServerGuiWrapper() @@ -38,26 +37,13 @@ void ServerGuiWrapper::initGui(int speed) {} Session &ServerGuiWrapper::getSession() { - return myGui->getSession(); + assert(mySession.get()); + return *mySession; } void ServerGuiWrapper::setSession(boost::shared_ptr session) { - myGui->setSession(session); -} - -bool -ServerGuiWrapper::isNetworkServer() const -{ - /* TODO hack */ - return true; -} - -void -ServerGuiWrapper::waitForNetworkAction(GameState state, unsigned uniquePlayerId) -{ - /* TODO hack */ - myGui->waitForNetworkAction(state, uniquePlayerId); + mySession = session; } void ServerGuiWrapper::refreshSet() const {} @@ -74,32 +60,32 @@ void ServerGuiWrapper::refreshPot() const {} void ServerGuiWrapper::refreshGroupbox(int playerID, int status) const {} void ServerGuiWrapper::refreshPlayerName() const {} -void ServerGuiWrapper::dealHoleCards() { myGui->dealHoleCards(); } -void ServerGuiWrapper::dealFlopCards() { myGui->dealFlopCards(); } -void ServerGuiWrapper::dealTurnCard() { myGui->dealTurnCard(); } -void ServerGuiWrapper::dealRiverCard() { myGui->dealRiverCard(); } +void ServerGuiWrapper::dealHoleCards() {} +void ServerGuiWrapper::dealFlopCards() {} +void ServerGuiWrapper::dealTurnCard() {} +void ServerGuiWrapper::dealRiverCard() {} void ServerGuiWrapper::highlightRoundLabel(string round) const {} -void ServerGuiWrapper::nextPlayerAnimation() { myGui->nextPlayerAnimation(); } +void ServerGuiWrapper::nextPlayerAnimation() {} -void ServerGuiWrapper::preflopAnimation1() { myGui->preflopAnimation1(); } -void ServerGuiWrapper::preflopAnimation2() { myGui->preflopAnimation2(); } +void ServerGuiWrapper::preflopAnimation1() {} +void ServerGuiWrapper::preflopAnimation2() {} -void ServerGuiWrapper::flopAnimation1() { myGui->flopAnimation1(); } -void ServerGuiWrapper::flopAnimation2() { myGui->flopAnimation2(); } +void ServerGuiWrapper::flopAnimation1() {} +void ServerGuiWrapper::flopAnimation2() {} -void ServerGuiWrapper::turnAnimation1() { myGui->turnAnimation1(); } -void ServerGuiWrapper::turnAnimation2() { myGui->turnAnimation2(); } +void ServerGuiWrapper::turnAnimation1() {} +void ServerGuiWrapper::turnAnimation2() {} -void ServerGuiWrapper::riverAnimation1() { myGui->riverAnimation1(); } -void ServerGuiWrapper::riverAnimation2() { myGui->riverAnimation2(); } +void ServerGuiWrapper::riverAnimation1() {} +void ServerGuiWrapper::riverAnimation2() {} -void ServerGuiWrapper::postRiverAnimation1() { myGui->postRiverAnimation1(); } -void ServerGuiWrapper::postRiverRunAnimation1() { myGui->postRiverRunAnimation1(); } +void ServerGuiWrapper::postRiverAnimation1() {} +void ServerGuiWrapper::postRiverRunAnimation1() {} -void ServerGuiWrapper::flipHolecardsAllIn() { myGui->flipHolecardsAllIn(); } +void ServerGuiWrapper::flipHolecardsAllIn() {} void ServerGuiWrapper::nextRoundCleanGui() {} diff --git a/src/gui/generic/serverguiwrapper.h b/src/gui/generic/serverguiwrapper.h index a5cfdef5..954fc939 100644 --- a/src/gui/generic/serverguiwrapper.h +++ b/src/gui/generic/serverguiwrapper.h @@ -22,7 +22,7 @@ #include class ConfigFile; -class GenericServerGui; +class Session; class ServerGuiWrapper : public GuiInterface { @@ -35,9 +35,6 @@ public: Session &getSession(); void setSession(boost::shared_ptr session); - bool isNetworkServer() const; - void waitForNetworkAction(GameState state, unsigned uniquePlayerId); - void refreshSet() const; void refreshCash() const; void refreshAction(int =-1, int =-1) const; @@ -95,7 +92,9 @@ public: private: - boost::shared_ptr myGui; + boost::shared_ptr mySession; + ConfigFile *myConfig; + ClientCallback *myClientcb; ServerCallback *myServercb; }; diff --git a/src/gui/guiinterface.h b/src/gui/guiinterface.h index 1f202e66..7c9aa72a 100644 --- a/src/gui/guiinterface.h +++ b/src/gui/guiinterface.h @@ -39,9 +39,6 @@ public: virtual Session &getSession() =0; virtual void setSession(boost::shared_ptr session) =0; - virtual bool isNetworkServer() const =0; - virtual void waitForNetworkAction(GameState state, unsigned uniquePlayerId) =0; - //refresh-Funktionen virtual void refreshSet() const=0; virtual void refreshCash() const=0; diff --git a/src/gui/qt/guiwrapper.cpp b/src/gui/qt/guiwrapper.cpp index 501a6f39..40a5c984 100644 --- a/src/gui/qt/guiwrapper.cpp +++ b/src/gui/qt/guiwrapper.cpp @@ -47,9 +47,6 @@ void GuiWrapper::initGui(int speed) { myW->initGui(speed); } Session &GuiWrapper::getSession() { return myW->getSession(); } void GuiWrapper::setSession(boost::shared_ptr session) { myW->setSession(session); } -bool GuiWrapper::isNetworkServer() const { /* TODO hack */ return false; } -void GuiWrapper::waitForNetworkAction(GameState state, unsigned uniquePlayerId) { /* TODO hack */ } - void GuiWrapper::refreshSet() const { myW->refreshSet(); } void GuiWrapper::refreshCash() const { myW->refreshCash(); } void GuiWrapper::refreshAction(int playerID, int playerAction) const { myW->refreshAction(playerID, playerAction); } diff --git a/src/gui/qt/guiwrapper.h b/src/gui/qt/guiwrapper.h index efe60381..72851da4 100644 --- a/src/gui/qt/guiwrapper.h +++ b/src/gui/qt/guiwrapper.h @@ -42,9 +42,6 @@ public: Session &getSession(); void setSession(boost::shared_ptr session); - bool isNetworkServer() const; - void waitForNetworkAction(GameState state, unsigned uniquePlayerId); - void refreshSet() const; void refreshCash() const; void refreshAction(int =-1, int =-1) const; diff --git a/src/net/common/serverrecvstate.cpp b/src/net/common/serverrecvstate.cpp index e7bbffe0..348c3860 100644 --- a/src/net/common/serverrecvstate.cpp +++ b/src/net/common/serverrecvstate.cpp @@ -318,6 +318,44 @@ ServerRecvStateStartRound::Process(ServerRecvThread &server) Game &curGame = server.GetGame(); curGame.getCurrentHand()->switchRounds(); + int playersTurn = 0; + + // TODO: no switch needed here if game states are polymorphic + switch(curGame.getCurrentHand()->getActualRound()) { + case 0: { + // Preflop starten + curGame.getCurrentHand()->getPreflop()->preflopRun(); + playersTurn = curGame.getCurrentHand()->getPreflop()->getPlayersTurn(); + } break; + case 1: { + // Flop starten + curGame.getCurrentHand()->getFlop()->flopRun(); + playersTurn = curGame.getCurrentHand()->getFlop()->getPlayersTurn(); + } break; + case 2: { + // Turn starten + curGame.getCurrentHand()->getTurn()->turnRun(); + playersTurn = curGame.getCurrentHand()->getTurn()->getPlayersTurn(); + } break; + case 3: { + // River starten + curGame.getCurrentHand()->getRiver()->riverRun(); + playersTurn = curGame.getCurrentHand()->getRiver()->getPlayersTurn(); + } break; + default: { + // TODO + } + } + + assert(playersTurn < curGame.getActualQuantityPlayers()); + + boost::shared_ptr notification(new NetPacketPlayersTurn); + NetPacketPlayersTurn::Data playersTurnData; + playersTurnData.gameState = (GameState)curGame.getCurrentHand()->getActualRound(); + playersTurnData.playerId = curGame.getPlayerArray()[playersTurn]->getMyUniqueID(); + static_cast(notification.get())->SetData(playersTurnData); + + server.SendToAllPlayers(notification); server.SetState(ServerRecvStateFinal::Instance()); diff --git a/src/net/common/serverrecvthread.cpp b/src/net/common/serverrecvthread.cpp index dea7ee6c..63c5679e 100644 --- a/src/net/common/serverrecvthread.cpp +++ b/src/net/common/serverrecvthread.cpp @@ -144,8 +144,6 @@ ServerRecvThread::NotificationLoop() case NOTIFY_GAME_START: InternalStartGame(); break; - case NOTIFY_WAIT_FOR_CLIENT_ACTION: - break; } } } diff --git a/src/net/common/serverthread.cpp b/src/net/common/serverthread.cpp index a7cfff64..c57168c0 100644 --- a/src/net/common/serverthread.cpp +++ b/src/net/common/serverthread.cpp @@ -65,16 +65,6 @@ ServerThread::StartGame() GetRecvThread().AddNotification(NOTIFY_GAME_START, 0, 0); } -void -ServerThread::WaitForClientAction(GameState state, unsigned uniquePlayerId) -{ - if (!IsRunning()) - return; // TODO: throw exception - - // Thread-safe notification. - GetRecvThread().AddNotification(NOTIFY_WAIT_FOR_CLIENT_ACTION, state, uniquePlayerId); -} - ServerCallback & ServerThread::GetCallback() { diff --git a/src/net/serverrecvthread.h b/src/net/serverrecvthread.h index 1009f3ec..4487cb30 100644 --- a/src/net/serverrecvthread.h +++ b/src/net/serverrecvthread.h @@ -37,7 +37,6 @@ // Notifications #define NOTIFY_GAME_START 1 -#define NOTIFY_WAIT_FOR_CLIENT_ACTION 2 class ServerRecvState; class SenderThread; diff --git a/src/net/serverthread.h b/src/net/serverthread.h index 83cff3a7..68207a33 100644 --- a/src/net/serverthread.h +++ b/src/net/serverthread.h @@ -44,7 +44,6 @@ public: void Init(unsigned serverPort, bool ipv6, const std::string &pwd, const GameData &gameData); void StartGame(); - void WaitForClientAction(GameState state, unsigned uniquePlayerId); ServerCallback &GetCallback(); GuiInterface &GetGui(); diff --git a/src/session.cpp b/src/session.cpp index 716de3d8..f2c0a3a1 100755 --- a/src/session.cpp +++ b/src/session.cpp @@ -160,13 +160,6 @@ void Session::initiateNetworkServerGame() myNetServer->StartGame(); } -void Session::waitForNetworkServerAction(GameState state, unsigned uniquePlayerId) -{ - if (!myNetServer) - return; // TODO: throw exception - myNetServer->WaitForClientAction(state, uniquePlayerId); -} - void Session::terminateNetworkServer() { if (!myNetServer) diff --git a/src/session.h b/src/session.h index 7d1aae55..6f86e49e 100755 --- a/src/session.h +++ b/src/session.h @@ -49,7 +49,6 @@ public: void startNetworkServer(const GameData &gameData); void initiateNetworkServerGame(); - void waitForNetworkServerAction(GameState state, unsigned uniquePlayerId); void terminateNetworkServer(); void setCurrentGameID(const int& theValue) { currentGameID = theValue; }