exceptions & bugfixes
This commit is contained in:
@@ -46,6 +46,7 @@ HEADERS += \
|
|||||||
src/core/thread.h \
|
src/core/thread.h \
|
||||||
src/core/crypthelper.h \
|
src/core/crypthelper.h \
|
||||||
src/core/avatarmanager.h \
|
src/core/avatarmanager.h \
|
||||||
|
src/core/pokerthexception.h \
|
||||||
src/engine/boardinterface.h \
|
src/engine/boardinterface.h \
|
||||||
src/engine/enginefactory.h \
|
src/engine/enginefactory.h \
|
||||||
src/engine/handinterface.h \
|
src/engine/handinterface.h \
|
||||||
@@ -70,6 +71,7 @@ HEADERS += \
|
|||||||
src/net/socket_startup.h \
|
src/net/socket_startup.h \
|
||||||
src/net/irccallback.h \
|
src/net/irccallback.h \
|
||||||
src/net/ircthread.h \
|
src/net/ircthread.h \
|
||||||
|
src/net/netexception.h \
|
||||||
src/core/tinyxml/tinystr.h \
|
src/core/tinyxml/tinystr.h \
|
||||||
src/core/tinyxml/tinyxml.h \
|
src/core/tinyxml/tinyxml.h \
|
||||||
src/core/libircclient/include/libircclient.h \
|
src/core/libircclient/include/libircclient.h \
|
||||||
@@ -86,6 +88,7 @@ HEADERS += \
|
|||||||
src/engine/local_engine/localberopostriver.h \
|
src/engine/local_engine/localberopostriver.h \
|
||||||
src/engine/local_engine/tools.h \
|
src/engine/local_engine/tools.h \
|
||||||
src/engine/local_engine/localbero.h \
|
src/engine/local_engine/localbero.h \
|
||||||
|
src/engine/local_engine/localexception.h \
|
||||||
src/engine/network_engine/clientboard.h \
|
src/engine/network_engine/clientboard.h \
|
||||||
src/engine/network_engine/clientenginefactory.h \
|
src/engine/network_engine/clientenginefactory.h \
|
||||||
src/engine/network_engine/clienthand.h \
|
src/engine/network_engine/clienthand.h \
|
||||||
@@ -110,6 +113,7 @@ SOURCES += \
|
|||||||
src/core/common/thread.cpp \
|
src/core/common/thread.cpp \
|
||||||
src/core/common/crypthelper.cpp \
|
src/core/common/crypthelper.cpp \
|
||||||
src/core/common/avatarmanager.cpp \
|
src/core/common/avatarmanager.cpp \
|
||||||
|
src/core/common/pokerthexception.cpp \
|
||||||
src/core/tinyxml/tinystr.cpp \
|
src/core/tinyxml/tinystr.cpp \
|
||||||
src/core/tinyxml/tinyxml.cpp \
|
src/core/tinyxml/tinyxml.cpp \
|
||||||
src/core/tinyxml/tinyxmlerror.cpp \
|
src/core/tinyxml/tinyxmlerror.cpp \
|
||||||
@@ -127,6 +131,7 @@ SOURCES += \
|
|||||||
src/engine/local_engine/localberopostriver.cpp \
|
src/engine/local_engine/localberopostriver.cpp \
|
||||||
src/engine/local_engine/tools.cpp \
|
src/engine/local_engine/tools.cpp \
|
||||||
src/engine/local_engine/localbero.cpp \
|
src/engine/local_engine/localbero.cpp \
|
||||||
|
src/engine/local_engine/localexception.cpp \
|
||||||
src/engine/network_engine/clientboard.cpp \
|
src/engine/network_engine/clientboard.cpp \
|
||||||
src/engine/network_engine/clientenginefactory.cpp \
|
src/engine/network_engine/clientenginefactory.cpp \
|
||||||
src/engine/network_engine/clienthand.cpp \
|
src/engine/network_engine/clienthand.cpp \
|
||||||
|
|||||||
+14
-10
@@ -86,12 +86,16 @@ HEADERS += \
|
|||||||
src/gui/qttoolsinterface.h \
|
src/gui/qttoolsinterface.h \
|
||||||
src/gui/qt/qttools/qttoolswrapper.h \
|
src/gui/qt/qttools/qttoolswrapper.h \
|
||||||
src/gui/qt/qttools/qthelper/qthelper.h \
|
src/gui/qt/qttools/qthelper/qthelper.h \
|
||||||
src/gui/generic/serverguiwrapper.h
|
src/gui/generic/serverguiwrapper.h \
|
||||||
|
src/core/pokerthexception.h \
|
||||||
|
src/engine/local_engine/localexception.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
src/pokerth_server.cpp
|
src/pokerth_server.cpp \
|
||||||
|
src/core/common/pokerthexception.cpp \
|
||||||
|
src/engine/local_engine/localexception.cpp
|
||||||
|
|
||||||
win32{
|
win32 {
|
||||||
DEPENDPATH += src/net/win32/ src/core/win32
|
DEPENDPATH += src/net/win32/ src/core/win32
|
||||||
INCLUDEPATH += ../boost/ ../OpenSSL/include
|
INCLUDEPATH += ../boost/ ../OpenSSL/include
|
||||||
LIBPATH += ../boost/stage/lib ../OpenSSL/lib
|
LIBPATH += ../boost/stage/lib ../OpenSSL/lib
|
||||||
@@ -109,25 +113,25 @@ win32{
|
|||||||
LIBS += -lboost_filesystem-mgw34-mt-1_34_1
|
LIBS += -lboost_filesystem-mgw34-mt-1_34_1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
!win32{
|
!win32 {
|
||||||
DEPENDPATH += src/net/linux/ src/core/linux
|
DEPENDPATH += src/net/linux/ src/core/linux
|
||||||
SOURCES += src/core/linux/daemon.c
|
SOURCES += src/core/linux/daemon.c
|
||||||
}
|
}
|
||||||
|
|
||||||
unix:!mac{
|
unix : !mac {
|
||||||
exists( /usr/lib/libboost_thread-mt.so ) {
|
exists( /usr/lib/libboost_thread-mt.so ){
|
||||||
message("Found libboost_thread-mt")
|
message("Found libboost_thread-mt")
|
||||||
LIBS += -lboost_thread-mt
|
LIBS += -lboost_thread-mt
|
||||||
}
|
}
|
||||||
exists( /usr/lib64/libboost_thread-mt.so ) {
|
exists( /usr/lib64/libboost_thread-mt.so ){
|
||||||
message("Found libboost_thread-mt")
|
message("Found libboost_thread-mt")
|
||||||
LIBS += -lboost_thread-mt
|
LIBS += -lboost_thread-mt
|
||||||
}
|
}
|
||||||
exists( /usr/lib/libboost_thread.so ) {
|
exists( /usr/lib/libboost_thread.so ){
|
||||||
message("Found libboost_thread")
|
message("Found libboost_thread")
|
||||||
LIBS += -lboost_thread
|
LIBS += -lboost_thread
|
||||||
}
|
}
|
||||||
exists( /usr/lib64/libboost_thread.so ) {
|
exists( /usr/lib64/libboost_thread.so ){
|
||||||
message("Found libboost_thread")
|
message("Found libboost_thread")
|
||||||
LIBS += -lboost_thread
|
LIBS += -lboost_thread
|
||||||
}
|
}
|
||||||
@@ -155,7 +159,7 @@ unix:!mac{
|
|||||||
|
|
||||||
## My release static libs
|
## My release static libs
|
||||||
#LIBS += -lcrypto
|
#LIBS += -lcrypto
|
||||||
}
|
}
|
||||||
|
|
||||||
#CONFIG += qt thread console embed_manifest_exe warn_on release
|
#CONFIG += qt thread console embed_manifest_exe warn_on release
|
||||||
CONFIG += qt thread console embed_manifest_exe warn_on debug
|
CONFIG += qt thread console embed_manifest_exe warn_on debug
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2006 by FThauer FHammer *
|
||||||
|
* f.thauer@web.de *
|
||||||
|
* *
|
||||||
|
* 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 "pokerthexception.h"
|
||||||
|
|
||||||
|
PokerTHException::~PokerTHException()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* 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. *
|
||||||
|
***************************************************************************/
|
||||||
|
/* Base exception class. */
|
||||||
|
|
||||||
|
#ifndef _POKERTHEXCEPTION_H_
|
||||||
|
#define _POKERTHEXCEPTION_H_
|
||||||
|
|
||||||
|
|
||||||
|
class PokerTHException
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
PokerTHException(int errorId, int osErrorCode)
|
||||||
|
: m_errorId(errorId), m_osErrorCode(osErrorCode) {}
|
||||||
|
virtual ~PokerTHException();
|
||||||
|
|
||||||
|
int GetErrorId() const {return m_errorId;}
|
||||||
|
int GetOsErrorCode() const {return m_osErrorCode;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
int m_errorId;
|
||||||
|
int m_osErrorCode;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "handinterface.h"
|
#include "handinterface.h"
|
||||||
#include <game_defs.h>
|
#include <game_defs.h>
|
||||||
|
#include "localexception.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* 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 "localexception.h"
|
||||||
|
|
||||||
|
|
||||||
|
LocalException::~LocalException()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* 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. *
|
||||||
|
***************************************************************************/
|
||||||
|
/* Exception class for engine errors. */
|
||||||
|
|
||||||
|
#ifndef _LOCALEXCEPTION_H_
|
||||||
|
#define _LOCALEXCEPTION_H_
|
||||||
|
|
||||||
|
#include "pokerthexception.h"
|
||||||
|
|
||||||
|
class LocalException : public PokerTHException
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
LocalException(int errorId)
|
||||||
|
: PokerTHException(errorId, 0) {}
|
||||||
|
virtual ~LocalException();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -112,7 +112,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
|
|
||||||
case 1: {
|
case 1: {
|
||||||
|
|
||||||
tempBoardArray[0] = 27;
|
/* tempBoardArray[0] = 27;
|
||||||
tempBoardArray[1] = 37;
|
tempBoardArray[1] = 37;
|
||||||
tempBoardArray[2] = 45;
|
tempBoardArray[2] = 45;
|
||||||
tempBoardArray[3] = 51;
|
tempBoardArray[3] = 51;
|
||||||
@@ -124,7 +124,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
tempPlayerAndBoardArray[3] = tempBoardArray[1];
|
tempPlayerAndBoardArray[3] = tempBoardArray[1];
|
||||||
tempPlayerAndBoardArray[4] = tempBoardArray[2];
|
tempPlayerAndBoardArray[4] = tempBoardArray[2];
|
||||||
tempPlayerAndBoardArray[5] = tempBoardArray[3];
|
tempPlayerAndBoardArray[5] = tempBoardArray[3];
|
||||||
tempPlayerAndBoardArray[6] = tempBoardArray[4];
|
tempPlayerAndBoardArray[6] = tempBoardArray[4];*/
|
||||||
|
|
||||||
// player0
|
// player0
|
||||||
it = seatsList->begin();
|
it = seatsList->begin();
|
||||||
@@ -142,7 +142,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
// player1
|
// player1
|
||||||
it++;
|
it++;
|
||||||
|
|
||||||
tempPlayerArray[0] = 12;
|
/* tempPlayerArray[0] = 12;
|
||||||
tempPlayerArray[1] = 48;
|
tempPlayerArray[1] = 48;
|
||||||
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
@@ -150,7 +150,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
(*it)->setMyCards(tempPlayerArray);
|
(*it)->setMyCards(tempPlayerArray);
|
||||||
(*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
(*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
||||||
|
|
||||||
(*it)->setMyBestHandPosition(temp5Array);
|
(*it)->setMyBestHandPosition(temp5Array);*/
|
||||||
|
|
||||||
// player2
|
// player2
|
||||||
it++;
|
it++;
|
||||||
@@ -181,28 +181,28 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
// player4
|
// player4
|
||||||
it++;
|
it++;
|
||||||
|
|
||||||
tempPlayerArray[0] = 25;
|
// tempPlayerArray[0] = 25;
|
||||||
tempPlayerArray[1] = 16;
|
// tempPlayerArray[1] = 16;
|
||||||
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
// tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
// tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
|
//
|
||||||
(*it)->setMyCards(tempPlayerArray);
|
// (*it)->setMyCards(tempPlayerArray);
|
||||||
(*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
// (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
||||||
|
//
|
||||||
(*it)->setMyBestHandPosition(temp5Array);
|
// (*it)->setMyBestHandPosition(temp5Array);
|
||||||
|
|
||||||
// player5
|
// player5
|
||||||
it++;
|
it++;
|
||||||
|
|
||||||
tempPlayerArray[0] = 43;
|
// tempPlayerArray[0] = 43;
|
||||||
tempPlayerArray[1] = 30;
|
// tempPlayerArray[1] = 30;
|
||||||
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
// tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
// tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
|
//
|
||||||
(*it)->setMyCards(tempPlayerArray);
|
// (*it)->setMyCards(tempPlayerArray);
|
||||||
(*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
// (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
||||||
|
//
|
||||||
(*it)->setMyBestHandPosition(temp5Array);
|
// (*it)->setMyBestHandPosition(temp5Array);
|
||||||
|
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
|
|||||||
@@ -860,22 +860,22 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
|
|||||||
myCash=0;
|
myCash=0;
|
||||||
} break;
|
} break;
|
||||||
case 1: {
|
case 1: {
|
||||||
myCash=2520;
|
myCash=0;
|
||||||
} break;
|
} break;
|
||||||
case 2: {
|
case 2: {
|
||||||
myCash=0;
|
myCash=180;
|
||||||
} break;
|
} break;
|
||||||
case 3: {
|
case 3: {
|
||||||
myCash=0;
|
myCash=3930;
|
||||||
} break;
|
} break;
|
||||||
case 4: {
|
case 4: {
|
||||||
myCash=14700;
|
myCash=0;
|
||||||
} break;
|
} break;
|
||||||
case 5: {
|
case 5: {
|
||||||
myCash=3780;
|
myCash=13590;
|
||||||
} break;
|
} break;
|
||||||
case 6: {
|
case 6: {
|
||||||
myCash=0;
|
myCash=3300;
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
}
|
}
|
||||||
@@ -1202,8 +1202,8 @@ void LocalPlayer::preflopEngine() {
|
|||||||
|
|
||||||
switch(actualHand->getMyID()) {
|
switch(actualHand->getMyID()) {
|
||||||
case 1: {
|
case 1: {
|
||||||
myAction = PLAYER_ACTION_RAISE;
|
// myAction = PLAYER_ACTION_RAISE;
|
||||||
raise = 3000;
|
// raise = 3000;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: {
|
case 2: {
|
||||||
@@ -1246,7 +1246,7 @@ void LocalPlayer::preflopEngine() {
|
|||||||
case 3: {
|
case 3: {
|
||||||
switch(actualHand->getMyID()) {
|
switch(actualHand->getMyID()) {
|
||||||
case 1: {
|
case 1: {
|
||||||
// myAction = PLAYER_ACTION_FOLD;
|
myAction = PLAYER_ACTION_FOLD;
|
||||||
// raise = 20;
|
// raise = 20;
|
||||||
// if(mySet >= 40) {
|
// if(mySet >= 40) {
|
||||||
// myAction = PLAYER_ACTION_CALL;
|
// myAction = PLAYER_ACTION_CALL;
|
||||||
@@ -1290,7 +1290,15 @@ void LocalPlayer::preflopEngine() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5: {
|
case 5: {
|
||||||
// myAction = PLAYER_ACTION_FOLD;
|
if(mySet == 0) {
|
||||||
|
myAction = PLAYER_ACTION_CALL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6: {
|
||||||
|
if(mySet == 160) {
|
||||||
|
myAction = PLAYER_ACTION_CALL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: {}
|
default: {}
|
||||||
|
|||||||
+2
-2
@@ -28,7 +28,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
||||||
const PlayerDataList &playerDataList, const GameData gameData,
|
const PlayerDataList &playerDataList, const GameData &gameData,
|
||||||
const StartData &startData, int gameId)
|
const StartData &startData, int gameId)
|
||||||
: myFactory(factory), myGui(gui), actualHand(0), actualBoard(0),
|
: myFactory(factory), myGui(gui), actualHand(0), actualBoard(0),
|
||||||
startQuantityPlayers(startData.numberOfPlayers),
|
startQuantityPlayers(startData.numberOfPlayers),
|
||||||
@@ -37,7 +37,7 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
|||||||
myGameID(gameId), actualSmallBlind(gameData.smallBlind), actualHandID(0), dealerPosition(0), lastHandBlindsRaised(1), lastTimeBlindsRaised(0), myGameData(gameData)
|
myGameID(gameId), actualSmallBlind(gameData.smallBlind), actualHandID(0), dealerPosition(0), lastHandBlindsRaised(1), lastTimeBlindsRaised(0), myGameData(gameData)
|
||||||
{
|
{
|
||||||
if(DEBUG_MODE) {
|
if(DEBUG_MODE) {
|
||||||
startSmallBlind = 5120;
|
startSmallBlind = 160;
|
||||||
actualSmallBlind = startSmallBlind;
|
actualSmallBlind = startSmallBlind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ class Game {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Game(GuiInterface *gui, boost::shared_ptr<EngineFactory> factory,
|
Game(GuiInterface *gui, boost::shared_ptr<EngineFactory> factory,
|
||||||
const PlayerDataList &playerDataList, const GameData gameData,
|
const PlayerDataList &playerDataList, const GameData &gameData,
|
||||||
const StartData &startData, int gameId);
|
const StartData &startData, int gameId);
|
||||||
|
|
||||||
~Game();
|
~Game();
|
||||||
|
|||||||
@@ -2522,7 +2522,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1000</width>
|
<width>1000</width>
|
||||||
<height>30</height>
|
<height>29</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuView" >
|
<widget class="QMenu" name="menuView" >
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
|
|||||||
startData.numberOfPlayers = gameData.maxNumberOfPlayers;
|
startData.numberOfPlayers = gameData.maxNumberOfPlayers;
|
||||||
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
|
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
|
||||||
if(DEBUG_MODE) {
|
if(DEBUG_MODE) {
|
||||||
tmpDealerPos = 4;
|
tmpDealerPos = 5;
|
||||||
}
|
}
|
||||||
startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos);
|
startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos);
|
||||||
|
|
||||||
@@ -2944,7 +2944,7 @@ void mainWindowImpl::localGameModification() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set the playing mode to "manual"
|
//Set the playing mode to "manual"
|
||||||
playingMode = 1;
|
playingMode = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,21 +21,15 @@
|
|||||||
#ifndef _NETEXCEPTION_H_
|
#ifndef _NETEXCEPTION_H_
|
||||||
#define _NETEXCEPTION_H_
|
#define _NETEXCEPTION_H_
|
||||||
|
|
||||||
|
#include "pokerthexception.h"
|
||||||
|
|
||||||
class NetException
|
class NetException : public PokerTHException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
NetException(int errorId, int osErrorCode)
|
NetException(int errorId, int osErrorCode)
|
||||||
: m_errorId(errorId), m_osErrorCode(osErrorCode) {}
|
: PokerTHException(errorId, osErrorCode) {}
|
||||||
virtual ~NetException();
|
virtual ~NetException();
|
||||||
|
|
||||||
int GetErrorId() const {return m_errorId;}
|
|
||||||
int GetOsErrorCode() const {return m_osErrorCode;}
|
|
||||||
|
|
||||||
private:
|
|
||||||
int m_errorId;
|
|
||||||
int m_osErrorCode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ void Session::startLocalGame(const GameData &gameData, const StartData &startDat
|
|||||||
currentGame->initHand();
|
currentGame->initHand();
|
||||||
currentGame->startHand();
|
currentGame->startHand();
|
||||||
// SPIEL-SCHLEIFE
|
// SPIEL-SCHLEIFE
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::startClientGame(boost::shared_ptr<Game> game)
|
void Session::startClientGame(boost::shared_ptr<Game> game)
|
||||||
|
|||||||
Reference in New Issue
Block a user