This commit is contained in:
doitux committed 2007-02-28 20:51:43 +00:00
1 parent 55cb71508b
commit eae5f68f89
14 files changed
+50 -17

No files matched your search

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+4 -1
View File
@@ -74,8 +74,11 @@ LocalHand::LocalHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, Playe
// Karten austeilen
myGui->dealHoleCards();
// myFlipCards auf 0 setzen
for(i=0; i<actualQuantityPlayers; i++) {
playerArray[i]->setMyCardsFlip(0);
}
// Preflop, Flop, Turn und River erstellen
myPreflop = myFactory->createPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
+4 -4
View File
@@ -71,6 +71,9 @@ public:
void setMyTurn(bool theValue){ myTurn = theValue;}
bool getMyTurn() const{ return myTurn;}
void setMyCardsFlip(bool theValue){ myCardsFlip = theValue;}
bool getMyCardsFlip() const{ return myCardsFlip;}
void setMyCardsValueInt(const int& theValue) { myCardsValueInt = theValue;}
int getMyCardsValueInt() const { return myCardsValueInt; }
@@ -88,10 +91,6 @@ public:
void flopEngine();
void turnEngine();
void riverEngine();
private:
@@ -116,6 +115,7 @@ private:
int myButton; // 0 = none, 1 = dealer, 2 =small, 3 = big
bool myActiveStatus; // 0 = inactive, 1 = active
bool myTurn; // 0 = no, 1 = yes
bool myCardsFlip; // 0 = cards are not fliped, 1 = cards are already flipped,
int myRoundStartCash;
int myAverageSets;
+3
View File
@@ -60,6 +60,9 @@ public:
virtual void setMyTurn(bool theValue) =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 int getMyCardsValueInt() const =0;
@@ -35,6 +35,8 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
QValidator *validator = new QRegExpValidator(rx, this);
lineEdit_profileName->setValidator(validator);
pushButton_delete->setDisabled(TRUE);
lineEdit_ipAddress->setFocus();
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));
}
pushButton_delete->setEnabled(TRUE);
}
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();
if ( profile ) {
cout << profile->Attribute("Name") << "\n";
profile->Parent()->RemoveChild(profile);
}
else { cout << "nööö" << "\n"; }
if ( profile ) { 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()),
QMessageBox::Close); }
//Liste Füllen
fillServerProfileList();
}
pushButton_delete->setDisabled(TRUE);
}
void joinNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
// std::cout << "key" << event->key();
if (event->key() == 16777220) { pushButton_connect->click(); } //ENTER
}
+24 -1
View File
@@ -1499,11 +1499,12 @@ void mainWindowImpl::postRiverRunAnimation2() {
for(j=0; j<2; j++) {
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/cards/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
}
}
//Karten umdrehen Loggen
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
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], actualHand->getPlayerArray()[i]->getMyCardsValueInt() );
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
}
}
}
@@ -1757,6 +1760,8 @@ void mainWindowImpl::flipHolecardsAllIn() {
}
//Karten umdrehen Loggen
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
myLog->logFlipHoleCardsMsg(actualHand->getPlayerArray()[i]->getMyName(), temp2CardsIntArray[0], temp2CardsIntArray[1] );
actualHand->getPlayerArray()[i]->setMyCardsFlip(1);
}
}
}
@@ -1794,6 +1801,21 @@ void mainWindowImpl::flipHolecardsAllIn() {
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() {
if( !breakAfterActualHand){ actualGame->startHand();
@@ -1971,6 +1993,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
if (event->key() == 16777266) { switchRightToolBox(); } //F3
if (event->key() == Qt::Key_F) { switchFullscreen(); } //f
if (event->key() == Qt::Key_S) { showMyCards(); } //f
if (event->key() == 16777249) {
pushButton_break->click();
ctrlPressed = TRUE;
+1
View File
@@ -158,6 +158,7 @@ public slots:
void postRiverRunAnimation6();
void flipHolecardsAllIn();
void showMyCards();
void handSwitchRounds();