refactoring Bugfix
This commit is contained in:
@@ -34,6 +34,9 @@ public:
|
|||||||
virtual void setHighestCardsValue(int theValue) =0;
|
virtual void setHighestCardsValue(int theValue) =0;
|
||||||
virtual int getHighestCardsValue() const =0;
|
virtual int getHighestCardsValue() const =0;
|
||||||
|
|
||||||
|
virtual void setLastActionPlayer( int theValue ) =0;
|
||||||
|
virtual int getLastActionPlayer() const =0;
|
||||||
|
|
||||||
virtual void resetFirstRun() =0;
|
virtual void resetFirstRun() =0;
|
||||||
|
|
||||||
virtual void nextPlayer() =0;
|
virtual void nextPlayer() =0;
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ protected:
|
|||||||
|
|
||||||
void setSmallBlind(int theValue) { smallBlind = theValue; }
|
void setSmallBlind(int theValue) { smallBlind = theValue; }
|
||||||
int getSmallBlind() const { return smallBlind; }
|
int getSmallBlind() const { return smallBlind; }
|
||||||
|
|
||||||
|
void setLastActionPlayer ( int theValue ) { lastActionPlayer = theValue; }
|
||||||
|
int getLastActionPlayer() const { return lastActionPlayer; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -79,6 +82,8 @@ private:
|
|||||||
|
|
||||||
bool logBoardCardsDone;
|
bool logBoardCardsDone;
|
||||||
|
|
||||||
|
int lastActionPlayer;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
LocalBeRoPostRiver::LocalBeRoPostRiver(HandInterface* hi, int id, int qP, int dP, int sB) : LocalBeRo(hi, id, qP, dP, sB, GAME_STATE_POST_RIVER)
|
LocalBeRoPostRiver::LocalBeRoPostRiver(HandInterface* hi, int id, int qP, int dP, int sB) : LocalBeRo(hi, id, qP, dP, sB, GAME_STATE_POST_RIVER), highestCardsValue(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
|
|
||||||
void run();
|
void run();
|
||||||
void distributePot();
|
void distributePot();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
int highestCardsValue;
|
int highestCardsValue;
|
||||||
|
|||||||
@@ -100,72 +100,78 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
|
|
||||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //
|
||||||
|
|
||||||
// // int temp5Array[5];
|
if(DEBUG_MODE) {
|
||||||
// //
|
|
||||||
// // tempBoardArray[0] = 8;
|
int temp5Array[5];
|
||||||
// // tempBoardArray[1] = 9;
|
|
||||||
// // tempBoardArray[2] = 10;
|
tempBoardArray[0] = 28;
|
||||||
// // tempBoardArray[3] = 11;
|
tempBoardArray[1] = 45;
|
||||||
// // tempBoardArray[4] = 13;
|
tempBoardArray[2] = 33;
|
||||||
// //
|
tempBoardArray[3] = 4;
|
||||||
// // myBoard->setMyCards(tempBoardArray);
|
tempBoardArray[4] = 49;
|
||||||
// //
|
|
||||||
// // tempPlayerAndBoardArray[2] = tempBoardArray[0];
|
myBoard->setMyCards(tempBoardArray);
|
||||||
// // tempPlayerAndBoardArray[3] = tempBoardArray[1];
|
|
||||||
// // tempPlayerAndBoardArray[4] = tempBoardArray[2];
|
tempPlayerAndBoardArray[2] = tempBoardArray[0];
|
||||||
// // tempPlayerAndBoardArray[5] = tempBoardArray[3];
|
tempPlayerAndBoardArray[3] = tempBoardArray[1];
|
||||||
// // tempPlayerAndBoardArray[6] = tempBoardArray[4];
|
tempPlayerAndBoardArray[4] = tempBoardArray[2];
|
||||||
// //
|
tempPlayerAndBoardArray[5] = tempBoardArray[3];
|
||||||
// // tempPlayerArray[0] = 13;
|
tempPlayerAndBoardArray[6] = tempBoardArray[4];
|
||||||
// // tempPlayerArray[1] = 25;
|
|
||||||
// // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
tempPlayerArray[0] = 47;
|
||||||
// // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
tempPlayerArray[1] = 12;
|
||||||
// //
|
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
// // playerArray[0]->setMyCards(tempPlayerArray);
|
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
// // playerArray[0]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
|
||||||
// //
|
playerArray[0]->setMyCards(tempPlayerArray);
|
||||||
// // playerArray[0]->setMyBestHandPosition(temp5Array);
|
playerArray[0]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
||||||
// //
|
|
||||||
// // // for(i=0; i<5; i++) {
|
playerArray[0]->setMyBestHandPosition(temp5Array);
|
||||||
// // // cout << temp5Array[i] << " ";
|
|
||||||
// // // }
|
// for(i=0; i<5; i++) {
|
||||||
// // // cout << endl;
|
// cout << temp5Array[i] << " ";
|
||||||
// //
|
// }
|
||||||
// // tempPlayerArray[0] = 31;
|
// cout << endl;
|
||||||
// // tempPlayerArray[1] = 18;
|
|
||||||
// // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
tempPlayerArray[0] = 31;
|
||||||
// // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
tempPlayerArray[1] = 18;
|
||||||
// //
|
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
// // playerArray[1]->setMyCards(tempPlayerArray);
|
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
// // playerArray[1]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
|
||||||
// //
|
playerArray[1]->setMyCards(tempPlayerArray);
|
||||||
// // playerArray[1]->setMyBestHandPosition(temp5Array);
|
playerArray[1]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
||||||
// //
|
|
||||||
// // tempPlayerArray[0] = 20;
|
playerArray[1]->setMyBestHandPosition(temp5Array);
|
||||||
// // tempPlayerArray[1] = 38;
|
|
||||||
// // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
tempPlayerArray[0] = 24;
|
||||||
// // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
tempPlayerArray[1] = 48;
|
||||||
// //
|
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
// // playerArray[2]->setMyCards(tempPlayerArray);
|
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
// // playerArray[2]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
|
||||||
// //
|
playerArray[2]->setMyCards(tempPlayerArray);
|
||||||
// // playerArray[2]->setMyBestHandPosition(temp5Array);
|
playerArray[2]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
||||||
// //
|
|
||||||
// // tempPlayerArray[0] = 19;
|
playerArray[2]->setMyBestHandPosition(temp5Array);
|
||||||
// // tempPlayerArray[1] = 51;
|
|
||||||
// // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
tempPlayerArray[0] = 19;
|
||||||
// // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
tempPlayerArray[1] = 51;
|
||||||
// //
|
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
|
||||||
// // playerArray[3]->setMyCards(tempPlayerArray);
|
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
|
||||||
// // playerArray[3]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
|
||||||
// //
|
playerArray[3]->setMyCards(tempPlayerArray);
|
||||||
// // playerArray[3]->setMyBestHandPosition(temp5Array);
|
playerArray[3]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
|
||||||
// //
|
|
||||||
// // // for(i=0; i<4; i++) {
|
playerArray[3]->setMyBestHandPosition(temp5Array);
|
||||||
// // // cout << i << ": " << playerArray[i]->getMyCardsValueInt() << endl;
|
|
||||||
// // // }
|
// for(i=0; i<4; i++) {
|
||||||
|
// cout << i << ": " << playerArray[i]->getMyCardsValueInt() << endl;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
dealerPosition = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
|
|
||||||
// Dealer, SB, BB bestimmen
|
// Dealer, SB, BB bestimmen
|
||||||
|
|||||||
@@ -31,18 +31,25 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
|
|||||||
: PlayerInterface(), myConfig(c), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myUniqueID(uniqueId), myType(type), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0)
|
: PlayerInterface(), myConfig(c), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myUniqueID(uniqueId), myType(type), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// for statistic development
|
// !!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
// if(myID==0) {
|
if(DEBUG_MODE) {
|
||||||
// myActiveStatus=0;
|
|
||||||
// myCash=20;
|
if(myID==0) {
|
||||||
// }
|
// myActiveStatus=0;
|
||||||
//
|
myCash=570;
|
||||||
// if(myID==1) {
|
}
|
||||||
// myCash=6130;
|
|
||||||
// }
|
if(myID==1) {
|
||||||
// if(myID==2) {
|
myCash=2730;
|
||||||
// myCash=37;
|
}
|
||||||
// }
|
if(myID==2) {
|
||||||
|
myCash=5970;
|
||||||
|
}
|
||||||
|
if(myID==3) {
|
||||||
|
myCash=2730;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
|
|
||||||
// myBestHandPosition mit -1 initialisieren
|
// myBestHandPosition mit -1 initialisieren
|
||||||
@@ -332,6 +339,23 @@ void LocalPlayer::preflopEngine() {
|
|||||||
|
|
||||||
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
|
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
|
||||||
|
|
||||||
|
if(DEBUG_MODE) {
|
||||||
|
switch(myID) {
|
||||||
|
case 0: {}
|
||||||
|
break;
|
||||||
|
case 1: { myAction = PLAYER_ACTION_FOLD; }
|
||||||
|
break;
|
||||||
|
case 2: { myAction = PLAYER_ACTION_CALL; }
|
||||||
|
break;
|
||||||
|
case 3: { myAction = PLAYER_ACTION_FOLD; }
|
||||||
|
break;
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
evaluation(bet, raise);
|
evaluation(bet, raise);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1215,6 +1239,10 @@ void LocalPlayer::riverEngine() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||||
|
actualHand->getCurrentBeRo()->setLastActionPlayer(myID);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// auf sBluffStatus testen --> raise statt call und bet statt check
|
// auf sBluffStatus testen --> raise statt call und bet statt check
|
||||||
@@ -1292,6 +1320,7 @@ void LocalPlayer::evaluation(int bet, int raise) {
|
|||||||
|
|
||||||
highestSet = actualHand->getCurrentBeRo()->getHighestSet();
|
highestSet = actualHand->getCurrentBeRo()->getHighestSet();
|
||||||
|
|
||||||
|
|
||||||
// cout << "myAction(evaluation): " << myAction << endl;
|
// cout << "myAction(evaluation): " << myAction << endl;
|
||||||
switch(myAction) {
|
switch(myAction) {
|
||||||
// none
|
// none
|
||||||
|
|||||||
@@ -41,6 +41,18 @@ ClientBeRo::setHighestCardsValue(int theValue)
|
|||||||
highestCardsValue = theValue;
|
highestCardsValue = theValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClientBeRo::setLastActionPlayer ( int theValue )
|
||||||
|
{
|
||||||
|
lastActionPlayer = theValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ClientBeRo::getLastActionPlayer() const
|
||||||
|
{
|
||||||
|
return lastActionPlayer;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientBeRo::setPlayersTurn(int theValue)
|
ClientBeRo::setPlayersTurn(int theValue)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ public:
|
|||||||
int getHighestCardsValue() const;
|
int getHighestCardsValue() const;
|
||||||
void setHighestCardsValue(int theValue);
|
void setHighestCardsValue(int theValue);
|
||||||
|
|
||||||
|
void setLastActionPlayer ( int theValue );
|
||||||
|
int getLastActionPlayer() const;
|
||||||
|
|
||||||
void setPlayersTurn(int theValue);
|
void setPlayersTurn(int theValue);
|
||||||
int getPlayersTurn() const;
|
int getPlayersTurn() const;
|
||||||
|
|
||||||
@@ -64,6 +67,8 @@ private:
|
|||||||
bool firstRound;
|
bool firstRound;
|
||||||
int smallBlindPosition;
|
int smallBlindPosition;
|
||||||
int smallBlind;
|
int smallBlind;
|
||||||
|
|
||||||
|
int lastActionPlayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -106,20 +106,12 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
|||||||
Game::~Game()
|
Game::~Game()
|
||||||
{
|
{
|
||||||
// cout << "Delete Game Object" << "\n";
|
// cout << "Delete Game Object" << "\n";
|
||||||
int i;
|
|
||||||
|
|
||||||
delete actualBoard;
|
delete actualBoard;
|
||||||
actualBoard = 0;
|
actualBoard = 0;
|
||||||
delete actualHand;
|
delete actualHand;
|
||||||
actualHand = 0;
|
actualHand = 0;
|
||||||
|
|
||||||
// boost::shared_ptr<PlayerInterface> tempPlayer;
|
|
||||||
// for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
|
||||||
// tempPlayer = playerArray[i];
|
|
||||||
// playerArray[i] = 0;
|
|
||||||
// delete tempPlayer;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HandInterface * Game::getCurrentHand()
|
HandInterface * Game::getCurrentHand()
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
#define MIN_GUI_SPEED 1
|
#define MIN_GUI_SPEED 1
|
||||||
#define MAX_GUI_SPEED 11
|
#define MAX_GUI_SPEED 11
|
||||||
|
|
||||||
|
#define DEBUG_MODE 0
|
||||||
|
|
||||||
enum GameState {
|
enum GameState {
|
||||||
GAME_STATE_PREFLOP = 0,
|
GAME_STATE_PREFLOP = 0,
|
||||||
GAME_STATE_FLOP,
|
GAME_STATE_FLOP,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
||||||
: QMainWindow(parent), myConfig(c), gameSpeed(0), myActionIsBet(0), myActionIsRaise(0), debugMode(0), breakAfterActualHand(FALSE)
|
: QMainWindow(parent), myConfig(c), gameSpeed(0), myActionIsBet(0), myActionIsRaise(0), breakAfterActualHand(FALSE)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -265,6 +265,8 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
postRiverAnimation1Timer = new QTimer(this);
|
postRiverAnimation1Timer = new QTimer(this);
|
||||||
postRiverRunAnimation1Timer = new QTimer(this);
|
postRiverRunAnimation1Timer = new QTimer(this);
|
||||||
postRiverRunAnimation2Timer = new QTimer(this);
|
postRiverRunAnimation2Timer = new QTimer(this);
|
||||||
|
postRiverRunAnimation2_flipHoleCards1Timer = new QTimer(this);
|
||||||
|
postRiverRunAnimation2_flipHoleCards2Timer = new QTimer(this);
|
||||||
postRiverRunAnimation3Timer = new QTimer(this);
|
postRiverRunAnimation3Timer = new QTimer(this);
|
||||||
postRiverRunAnimation5Timer = new QTimer(this);
|
postRiverRunAnimation5Timer = new QTimer(this);
|
||||||
potDistributeTimer = new QTimer(this);
|
potDistributeTimer = new QTimer(this);
|
||||||
@@ -299,6 +301,8 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
postRiverAnimation1Timer->setSingleShot(TRUE);
|
postRiverAnimation1Timer->setSingleShot(TRUE);
|
||||||
postRiverRunAnimation1Timer->setSingleShot(TRUE);
|
postRiverRunAnimation1Timer->setSingleShot(TRUE);
|
||||||
postRiverRunAnimation2Timer->setSingleShot(TRUE);
|
postRiverRunAnimation2Timer->setSingleShot(TRUE);
|
||||||
|
postRiverRunAnimation2_flipHoleCards1Timer->setSingleShot(TRUE);
|
||||||
|
postRiverRunAnimation2_flipHoleCards2Timer->setSingleShot(TRUE);
|
||||||
postRiverRunAnimation3Timer->setSingleShot(TRUE);
|
postRiverRunAnimation3Timer->setSingleShot(TRUE);
|
||||||
postRiverRunAnimation5Timer->setSingleShot(TRUE);
|
postRiverRunAnimation5Timer->setSingleShot(TRUE);
|
||||||
postRiverRunAnimation6Timer->setSingleShot(TRUE);
|
postRiverRunAnimation6Timer->setSingleShot(TRUE);
|
||||||
@@ -555,6 +559,8 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
connect(postRiverAnimation1Timer, SIGNAL(timeout()), this, SLOT( postRiverAnimation1Action() ));
|
connect(postRiverAnimation1Timer, SIGNAL(timeout()), this, SLOT( postRiverAnimation1Action() ));
|
||||||
connect(postRiverRunAnimation1Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation2() ));
|
connect(postRiverRunAnimation1Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation2() ));
|
||||||
connect(postRiverRunAnimation2Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation3() ));
|
connect(postRiverRunAnimation2Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation3() ));
|
||||||
|
connect(postRiverRunAnimation2_flipHoleCards1Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation2_flipHoleCards1() ));
|
||||||
|
connect(postRiverRunAnimation2_flipHoleCards2Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation2_flipHoleCards2() ));
|
||||||
connect(postRiverRunAnimation3Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation4() ));
|
connect(postRiverRunAnimation3Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation4() ));
|
||||||
connect(potDistributeTimer, SIGNAL(timeout()), this, SLOT(postRiverRunAnimation5()));
|
connect(potDistributeTimer, SIGNAL(timeout()), this, SLOT(postRiverRunAnimation5()));
|
||||||
connect(postRiverRunAnimation5Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation6() ));
|
connect(postRiverRunAnimation5Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation6() ));
|
||||||
@@ -1299,7 +1305,7 @@ void mainWindowImpl::dealHoleCards() {
|
|||||||
currentGame->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
|
currentGame->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
|
||||||
for(j=0; j<2; j++) {
|
for(j=0; j<2; j++) {
|
||||||
if(currentGame->getPlayerArray()[i]->getMyActiveStatus()) {
|
if(currentGame->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||||
if ((i == 0) || debugMode) {
|
if ((i == 0) || DEBUG_MODE) {
|
||||||
tempCardsPixmapArray[j].load(":/cards/resources/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png");
|
tempCardsPixmapArray[j].load(":/cards/resources/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png");
|
||||||
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j],FALSE);
|
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j],FALSE);
|
||||||
|
|
||||||
@@ -1838,20 +1844,7 @@ void mainWindowImpl::riverAnimation2Action() { mySession->getCurrentGame()->getC
|
|||||||
void mainWindowImpl::postRiverAnimation1() { postRiverAnimation1Timer->start(nextPlayerSpeed2); }
|
void mainWindowImpl::postRiverAnimation1() { postRiverAnimation1Timer->start(nextPlayerSpeed2); }
|
||||||
void mainWindowImpl::postRiverAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getCurrentBeRo()->run(); }
|
void mainWindowImpl::postRiverAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getCurrentBeRo()->run(); }
|
||||||
|
|
||||||
void mainWindowImpl::postRiverRunAnimation1() {
|
void mainWindowImpl::postRiverRunAnimation1() { postRiverRunAnimation1Timer->start(postRiverRunAnimationSpeed); }
|
||||||
|
|
||||||
//RoundsLabel mit "River" dunkel machen
|
|
||||||
// QPalette tempPalette = frame_handLabel->palette();
|
|
||||||
// tempPalette.setColor(QPalette::Window, active);
|
|
||||||
// frame_handLabel->setPalette(tempPalette);
|
|
||||||
|
|
||||||
//PotLabel aufhellen!
|
|
||||||
// // tempPalette = frame_Pot->palette();
|
|
||||||
// tempPalette.setColor(QPalette::Window, highlight);
|
|
||||||
// frame_Pot->setPalette(tempPalette);
|
|
||||||
|
|
||||||
postRiverRunAnimation1Timer->start(postRiverRunAnimationSpeed);
|
|
||||||
}
|
|
||||||
|
|
||||||
void mainWindowImpl::postRiverRunAnimation2() {
|
void mainWindowImpl::postRiverRunAnimation2() {
|
||||||
|
|
||||||
@@ -1868,7 +1861,11 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
|||||||
|
|
||||||
if(!flipHolecardsAllInAlreadyDone) {
|
if(!flipHolecardsAllInAlreadyDone) {
|
||||||
|
|
||||||
//Config? mit oder ohne Eye-Candy?
|
//TODO - Turn cards like in the rules
|
||||||
|
|
||||||
|
// postRiverRunAnimation2_flipHoleCards1Timer->start(nextPlayerSpeed2);
|
||||||
|
|
||||||
|
// //Config? mit oder ohne Eye-Candy?
|
||||||
if(myConfig->readConfigInt("ShowFlipCardsAnimation")) {
|
if(myConfig->readConfigInt("ShowFlipCardsAnimation")) {
|
||||||
// mit Eye-Candy
|
// mit Eye-Candy
|
||||||
|
|
||||||
@@ -1937,12 +1934,35 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
|||||||
else { postRiverRunAnimation3(); }
|
else { postRiverRunAnimation3(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
void mainWindowImpl::postRiverRunAnimation2_flipHoleCards1() {
|
||||||
|
|
||||||
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
|
|
||||||
|
currentHand->getCurrentBeRo()->setPlayersTurn(currentHand->getCurrentBeRo()->getLastActionPlayer());
|
||||||
|
|
||||||
|
postRiverRunAnimation2_flipHoleCards2Timer->start(nextPlayerSpeed2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void mainWindowImpl::postRiverRunAnimation2_flipHoleCards2() {
|
||||||
|
|
||||||
|
// if() {
|
||||||
|
// postRiverRunAnimation2_flipHoleCards1Timer->start(nextPlayerSpeed2);
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// postRiverRunAnimation2Timer->start(postRiverRunAnimationSpeed);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void mainWindowImpl::postRiverRunAnimation3() {
|
void mainWindowImpl::postRiverRunAnimation3() {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
//Alle Winner erhellen und "Winner" schreiben
|
//Alle Winner erhellen und "Winner" schreiben
|
||||||
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
|
|
||||||
if(currentHand->getPlayerArray()[i]->getMyActiveStatus() && currentHand->getPlayerArray()[i]->getMyAction() != 1 && currentHand->getPlayerArray()[i]->getMyCardsValueInt() == currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
|
if(currentHand->getPlayerArray()[i]->getMyActiveStatus() && currentHand->getPlayerArray()[i]->getMyAction() != 1 && currentHand->getPlayerArray()[i]->getMyCardsValueInt() == currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
|
||||||
|
|
||||||
// QPalette tempPalette = groupBoxArray[i]->palette();
|
// QPalette tempPalette = groupBoxArray[i]->palette();
|
||||||
|
|||||||
@@ -230,6 +230,8 @@ public slots:
|
|||||||
|
|
||||||
void postRiverRunAnimation1();
|
void postRiverRunAnimation1();
|
||||||
void postRiverRunAnimation2();
|
void postRiverRunAnimation2();
|
||||||
|
void postRiverRunAnimation2_flipHoleCards1();
|
||||||
|
void postRiverRunAnimation2_flipHoleCards2();
|
||||||
void postRiverRunAnimation3();
|
void postRiverRunAnimation3();
|
||||||
void postRiverRunAnimation4();
|
void postRiverRunAnimation4();
|
||||||
void postRiverRunAnimation5();
|
void postRiverRunAnimation5();
|
||||||
@@ -274,6 +276,7 @@ public slots:
|
|||||||
void networkGameModification();
|
void networkGameModification();
|
||||||
|
|
||||||
void quitPokerTH();
|
void quitPokerTH();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -339,6 +342,8 @@ private:
|
|||||||
QTimer *postRiverAnimation1Timer;
|
QTimer *postRiverAnimation1Timer;
|
||||||
QTimer *postRiverRunAnimation1Timer;
|
QTimer *postRiverRunAnimation1Timer;
|
||||||
QTimer *postRiverRunAnimation2Timer;
|
QTimer *postRiverRunAnimation2Timer;
|
||||||
|
QTimer *postRiverRunAnimation2_flipHoleCards1Timer;
|
||||||
|
QTimer *postRiverRunAnimation2_flipHoleCards2Timer;
|
||||||
QTimer *postRiverRunAnimation3Timer;
|
QTimer *postRiverRunAnimation3Timer;
|
||||||
QTimer *postRiverRunAnimation5Timer;
|
QTimer *postRiverRunAnimation5Timer;
|
||||||
QTimer *postRiverRunAnimation6Timer;
|
QTimer *postRiverRunAnimation6Timer;
|
||||||
@@ -396,7 +401,6 @@ private:
|
|||||||
bool myActionIsBet;
|
bool myActionIsBet;
|
||||||
bool myActionIsRaise;
|
bool myActionIsRaise;
|
||||||
|
|
||||||
bool debugMode;
|
|
||||||
bool breakAfterActualHand;
|
bool breakAfterActualHand;
|
||||||
|
|
||||||
bool flipHolecardsAllInAlreadyDone;
|
bool flipHolecardsAllInAlreadyDone;
|
||||||
|
|||||||
Reference in New Issue
Block a user