This commit is contained in:
+2
-2
@@ -115,8 +115,8 @@ SOURCES += pokerth.cpp \
|
|||||||
TEMPLATE = vcapp
|
TEMPLATE = vcapp
|
||||||
RESOURCES = src/gui/qt/deck.qrc
|
RESOURCES = src/gui/qt/deck.qrc
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
DEPENDPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/startnetworkgamedialog src/gui/qt/createnetworkgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
|
DEPENDPATH += . src uics src/config src/core/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/startnetworkgamedialog src/gui/qt/createnetworkgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
|
||||||
INCLUDEPATH += . src uics src/config src/config/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/startnetworkgamedialog src/gui/qt/createnetworkgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
|
INCLUDEPATH += . src uics src/config src/core/tinyxml src/gui src/gui/qt src/gui/qt/mainwindow/startsplash src/gui/qt/mainwindow src/gui/qt/aboutpokerth src/gui/qt/joinnetworkgamedialog src/gui/qt/connecttoserverdialog src/gui/qt/newlocalgamedialog src/gui/qt/settingsdialog src/gui/qt/waitforservertostartgamedialog src/gui/qt/startnetworkgamedialog src/gui/qt/createnetworkgamedialog src/gui/qt/log src/engine src/engine/local_engine src/net src/net/common src/core/
|
||||||
win32 {
|
win32 {
|
||||||
DEPENDPATH += src/net/win32/
|
DEPENDPATH += src/net/win32/
|
||||||
INCLUDEPATH += ../boost/
|
INCLUDEPATH += ../boost/
|
||||||
|
|||||||
@@ -75,7 +75,10 @@ LocalHand::LocalHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, Playe
|
|||||||
// Karten austeilen
|
// Karten austeilen
|
||||||
myGui->dealHoleCards();
|
myGui->dealHoleCards();
|
||||||
|
|
||||||
|
// myFlipCards auf 0 setzen
|
||||||
|
for(i=0; i<actualQuantityPlayers; i++) {
|
||||||
|
playerArray[i]->setMyCardsFlip(0);
|
||||||
|
}
|
||||||
|
|
||||||
// Preflop, Flop, Turn und River erstellen
|
// Preflop, Flop, Turn und River erstellen
|
||||||
myPreflop = myFactory->createPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
myPreflop = myFactory->createPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ public:
|
|||||||
void setMyTurn(bool theValue){ myTurn = theValue;}
|
void setMyTurn(bool theValue){ myTurn = theValue;}
|
||||||
bool getMyTurn() const{ return myTurn;}
|
bool getMyTurn() const{ return myTurn;}
|
||||||
|
|
||||||
|
void setMyCardsFlip(bool theValue){ myCardsFlip = theValue;}
|
||||||
|
bool getMyCardsFlip() const{ return myCardsFlip;}
|
||||||
|
|
||||||
void setMyCardsValueInt(const int& theValue) { myCardsValueInt = theValue;}
|
void setMyCardsValueInt(const int& theValue) { myCardsValueInt = theValue;}
|
||||||
int getMyCardsValueInt() const { return myCardsValueInt; }
|
int getMyCardsValueInt() const { return myCardsValueInt; }
|
||||||
|
|
||||||
@@ -90,10 +93,6 @@ public:
|
|||||||
void riverEngine();
|
void riverEngine();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HandInterface *actualHand;
|
HandInterface *actualHand;
|
||||||
BoardInterface *actualBoard;
|
BoardInterface *actualBoard;
|
||||||
@@ -116,6 +115,7 @@ private:
|
|||||||
int myButton; // 0 = none, 1 = dealer, 2 =small, 3 = big
|
int myButton; // 0 = none, 1 = dealer, 2 =small, 3 = big
|
||||||
bool myActiveStatus; // 0 = inactive, 1 = active
|
bool myActiveStatus; // 0 = inactive, 1 = active
|
||||||
bool myTurn; // 0 = no, 1 = yes
|
bool myTurn; // 0 = no, 1 = yes
|
||||||
|
bool myCardsFlip; // 0 = cards are not fliped, 1 = cards are already flipped,
|
||||||
int myRoundStartCash;
|
int myRoundStartCash;
|
||||||
|
|
||||||
int myAverageSets;
|
int myAverageSets;
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ public:
|
|||||||
virtual void setMyTurn(bool theValue) =0;
|
virtual void setMyTurn(bool theValue) =0;
|
||||||
virtual bool getMyTurn() const =0;
|
virtual bool getMyTurn() const =0;
|
||||||
|
|
||||||
|
virtual void setMyCardsFlip(bool theValue) =0;
|
||||||
|
virtual bool getMyCardsFlip() const =0;
|
||||||
|
|
||||||
virtual void setMyCardsValueInt(const int& theValue) =0;
|
virtual void setMyCardsValueInt(const int& theValue) =0;
|
||||||
virtual int getMyCardsValueInt() const =0;
|
virtual int getMyCardsValueInt() const =0;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
|
|||||||
QValidator *validator = new QRegExpValidator(rx, this);
|
QValidator *validator = new QRegExpValidator(rx, this);
|
||||||
lineEdit_profileName->setValidator(validator);
|
lineEdit_profileName->setValidator(validator);
|
||||||
|
|
||||||
|
pushButton_delete->setDisabled(TRUE);
|
||||||
|
|
||||||
lineEdit_ipAddress->setFocus();
|
lineEdit_ipAddress->setFocus();
|
||||||
|
|
||||||
myServerProfilesFile = myConfig.readConfigString("DataDir")+"serverprofiles.xml";
|
myServerProfilesFile = myConfig.readConfigString("DataDir")+"serverprofiles.xml";
|
||||||
@@ -141,6 +143,8 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int column)
|
|||||||
checkBox_ipv6->setChecked(QString::fromStdString(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
|
checkBox_ipv6->setChecked(QString::fromStdString(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pushButton_delete->setEnabled(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void joinNetworkGameDialogImpl::saveServerProfile() {
|
void joinNetworkGameDialogImpl::saveServerProfile() {
|
||||||
@@ -202,22 +206,21 @@ void joinNetworkGameDialogImpl::deleteServerProfile() {
|
|||||||
|
|
||||||
TiXmlElement* profile = docHandle.FirstChild( "PokerTH" ).FirstChild( "ServerProfiles" ).FirstChild( treeWidget->currentItem()->data(0,0).toString().toStdString() ).ToElement();
|
TiXmlElement* profile = docHandle.FirstChild( "PokerTH" ).FirstChild( "ServerProfiles" ).FirstChild( treeWidget->currentItem()->data(0,0).toString().toStdString() ).ToElement();
|
||||||
|
|
||||||
if ( profile ) {
|
if ( profile ) { profile->Parent()->RemoveChild(profile); }
|
||||||
cout << profile->Attribute("Name") << "\n";
|
|
||||||
profile->Parent()->RemoveChild(profile);
|
if(!doc.SaveFile()) { QMessageBox::warning(this, tr("Save Server-Profile-File Error"),
|
||||||
}
|
tr("Could not save Server-Profiles-File:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
|
||||||
else { cout << "nööö" << "\n"; }
|
QMessageBox::Close); }
|
||||||
|
|
||||||
//Liste Füllen
|
//Liste Füllen
|
||||||
fillServerProfileList();
|
fillServerProfileList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pushButton_delete->setDisabled(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void joinNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
|
void joinNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
|
||||||
|
|
||||||
// std::cout << "key" << event->key();
|
// std::cout << "key" << event->key();
|
||||||
|
|
||||||
if (event->key() == 16777220) { pushButton_connect->click(); } //ENTER
|
if (event->key() == 16777220) { pushButton_connect->click(); } //ENTER
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1499,11 +1499,12 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
|||||||
for(j=0; j<2; j++) {
|
for(j=0; j<2; j++) {
|
||||||
|
|
||||||
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/cards/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
|
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/cards/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[i]->getMyCardsValueInt());
|
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[i]->getMyCardsValueInt());
|
||||||
|
|
||||||
|
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1530,6 +1531,8 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
|||||||
}
|
}
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[i]->getMyCardsValueInt() );
|
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[i]->getMyCardsValueInt() );
|
||||||
|
|
||||||
|
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1758,6 +1761,8 @@ void mainWindowImpl::flipHolecardsAllIn() {
|
|||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1]);
|
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1]);
|
||||||
|
|
||||||
|
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1784,6 +1789,8 @@ void mainWindowImpl::flipHolecardsAllIn() {
|
|||||||
}
|
}
|
||||||
//Karten umdrehen Loggen
|
//Karten umdrehen Loggen
|
||||||
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), temp2CardsIntArray[0], temp2CardsIntArray[1] );
|
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), temp2CardsIntArray[0], temp2CardsIntArray[1] );
|
||||||
|
|
||||||
|
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1794,6 +1801,21 @@ void mainWindowImpl::flipHolecardsAllIn() {
|
|||||||
flipHolecardsAllInAlreadyDone = TRUE;
|
flipHolecardsAllInAlreadyDone = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mainWindowImpl::showMyCards() {
|
||||||
|
|
||||||
|
//TempArrays
|
||||||
|
int tempCardsIntArray[2];
|
||||||
|
|
||||||
|
actualHand->getPlayerArray()[0]->getMyCards(tempCardsIntArray);
|
||||||
|
if( actualHand->getPlayerArray()[0]->getMyCardsFlip() == 0 && actualHand->getActualRound() == 4 && actualHand->getPlayerArray()[0]->getMyActiveStatus() && actualHand->getPlayerArray()[0]->getMyAction() != 1) {
|
||||||
|
//Karten umdrehen Loggen
|
||||||
|
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[0]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[0]->getMyCardsValueInt() );
|
||||||
|
|
||||||
|
actualHand->getPlayerArray()[0]->setMyCardsFlip(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void mainWindowImpl::startNewHand() {
|
void mainWindowImpl::startNewHand() {
|
||||||
|
|
||||||
if( !breakAfterActualHand){ actualGame->startHand();
|
if( !breakAfterActualHand){ actualGame->startHand();
|
||||||
@@ -1971,6 +1993,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
|||||||
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
|
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
|
||||||
if (event->key() == 16777266) { switchRightToolBox(); } //F3
|
if (event->key() == 16777266) { switchRightToolBox(); } //F3
|
||||||
if (event->key() == Qt::Key_F) { switchFullscreen(); } //f
|
if (event->key() == Qt::Key_F) { switchFullscreen(); } //f
|
||||||
|
if (event->key() == Qt::Key_S) { showMyCards(); } //f
|
||||||
if (event->key() == 16777249) {
|
if (event->key() == 16777249) {
|
||||||
pushButton_break->click();
|
pushButton_break->click();
|
||||||
ctrlPressed = TRUE;
|
ctrlPressed = TRUE;
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ public slots:
|
|||||||
void postRiverRunAnimation6();
|
void postRiverRunAnimation6();
|
||||||
|
|
||||||
void flipHolecardsAllIn();
|
void flipHolecardsAllIn();
|
||||||
|
void showMyCards();
|
||||||
|
|
||||||
void handSwitchRounds();
|
void handSwitchRounds();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user