remove network items from gui

This commit is contained in:
doitux
2007-03-30 21:02:44 +00:00
parent 73defd8fab
commit 9daf779061
7 changed files with 214 additions and 16 deletions
+4 -4
View File
@@ -34,7 +34,7 @@ using namespace std;
ConfigFile::ConfigFile()
{
// !!!! Revisionsnummer der Configdefaults !!!!!
configRev = 15;
configRev = 16;
// Pfad und Dateinamen setzen
#ifdef _WIN32
@@ -139,19 +139,19 @@ void ConfigFile::createDefaultConfig() {
confElement1->SetAttribute("value", 7);
TiXmlElement * confElement2 = new TiXmlElement( "StartCash" );
config->LinkEndChild( confElement2 );
confElement2->SetAttribute("value", 2000);
confElement2->SetAttribute("value", 3000);
TiXmlElement * confElement3 = new TiXmlElement( "SmallBlind" );
config->LinkEndChild( confElement3 );
confElement3->SetAttribute("value", 10);
TiXmlElement * confElement12 = new TiXmlElement( "HandsBeforeRaiseSmallBlind" );
config->LinkEndChild( confElement12 );
confElement12->SetAttribute("value", 9);
confElement12->SetAttribute("value", 8);
TiXmlElement * confElement4 = new TiXmlElement( "GameSpeed" );
config->LinkEndChild( confElement4 );
confElement4->SetAttribute("value", 4);
TiXmlElement * confElement32 = new TiXmlElement( "EngineVersion" );
config->LinkEndChild( confElement32 );
confElement32->SetAttribute("value", 1);
confElement32->SetAttribute("value", 0);
TiXmlElement * confElement14 = new TiXmlElement( "PauseBetweenHands" );
config->LinkEndChild( confElement14 );
confElement14->SetAttribute("value", 0);
+197 -9
View File
@@ -145,9 +145,9 @@ void LocalPlayer::preflopEngine() {
// Niveaus setzen + Dude + Anzahl Gegenspieler
// 1. Fold -- Call
myNiveau[0] = 42 + myDude4 - 6*(players - 2);
myNiveau[0] = 43 + myDude4 - 6*(players - 2);
// 3. Call -- Raise
myNiveau[2] = 53 + myDude4 - 6*(players - 2);
myNiveau[2] = 50 + myDude4 - 6*(players - 2);
// eigenes mögliches highestSet
int individualHighestSet = actualHand->getPreflop()->getHighestSet();
@@ -265,6 +265,7 @@ void LocalPlayer::preflopEngine() {
}
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
evaluation(bet, raise);
}
@@ -277,6 +278,7 @@ void LocalPlayer::flopEngine() {
int i;
int cBluff;
Tools myTool;
int rand;
// übergang solange preflopValue und flopValue noch nicht bereinigt
int players = actualHand->getActualQuantityPlayers();
@@ -286,9 +288,9 @@ void LocalPlayer::flopEngine() {
// Niveaus setzen + Dude + Anzahl Gegenspieler
// 1. Fold -- Call
myNiveau[0] = 43 + myDude4 - 6*(players - 2);
myNiveau[0] = 45 + myDude4 - 6*(players - 2);
// 2. Check -- Bet
myNiveau[1] = 55 + myDude4 - 6*(players - 2);
myNiveau[1] = 53 + myDude4 - 6*(players - 2);
// 3. Call -- Raise
myNiveau[2] = 67 + myDude4 - 6*(players - 2);
@@ -405,8 +407,69 @@ void LocalPlayer::flopEngine() {
}
// auf sBluffStatus testen --> raise statt call und bet statt check
// aktiv oder passiv?
if(actualHand->getFlop()->getHighestSet() > 0) {
if(sBluffStatus && myOdds < myNiveau[2]) {
// cout << "sBLUFF!" << endl;
// Gegner setzen -> call
if(actualHand->getFlop()->getHighestSet() >= 4*actualHand->getSmallBlind()) {
myAction = 3;
}
// Standard-Raise-Routine
else {
// raise-Betrag ermitteln
myTool.getRandNumber(1,8,1,&rand,0);
raise = rand*actualHand->getSmallBlind();
// raise-Betrag zu klein -> mindestens Standard-raise
if(raise < actualHand->getFlop()->getHighestSet()) {
raise = actualHand->getFlop()->getHighestSet();
}
// all in bei nur wenigen Chips oder knappem raise
if(myCash/(2*actualHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
raise = myCash;
}
myAction = 5;
}
// extrem hoher set der gegner -> bluff beenden
if(actualHand->getFlop()->getHighestSet() >= 10*actualHand->getSmallBlind()) {
myAction = 1;
}
}
}
else {
if(sBluffStatus && myOdds < myNiveau[1]) {
// cout << "sBLUFF!" << endl;
myTool.getRandNumber(1,8,1,&rand,0);
bet = rand*actualHand->getSmallBlind();
// bet zu klein
if(bet == 0) {
bet = 2*actualHand->getSmallBlind();
}
// all in bei nur wenigen Chips
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
bet = myCash;
}
// all in bei knappem bet
if(bet > (myCash*4.0)/5.0) {
bet = myCash;
}
myAction = 4;
}
}
// cout << myID << ": Dude " << myDude4 << "\t Wert " << myOdds << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << endl;
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
evaluation(bet, raise);
@@ -681,14 +744,15 @@ void LocalPlayer::turnEngine() {
int i;
int cBluff;
Tools myTool;
int rand;
readFile();
// Niveaus setzen + Dude + Anzahl Gegenspieler
// 1. Fold -- Call
myNiveau[0] = 45 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
myNiveau[0] = 46 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 2. Check -- Bet
myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
myNiveau[1] = 54 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 3. Call -- Raise
myNiveau[2] = 66 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
@@ -805,6 +869,67 @@ void LocalPlayer::turnEngine() {
}
}
// auf sBluffStatus testen --> raise statt call und bet statt check
// aktiv oder passiv?
if(actualHand->getTurn()->getHighestSet() > 0) {
if(sBluffStatus && myOdds < myNiveau[2]) {
// cout << "sBLUFF!" << endl;
// Gegner setzen -> call
if(actualHand->getTurn()->getHighestSet() >= 4*actualHand->getSmallBlind()) {
myAction = 3;
}
// Standard-Raise-Routine
else {
// raise-Betrag ermitteln
myTool.getRandNumber(1,8,1,&rand,0);
raise = rand*actualHand->getSmallBlind();
// raise-Betrag zu klein -> mindestens Standard-raise
if(raise < actualHand->getTurn()->getHighestSet()) {
raise = actualHand->getTurn()->getHighestSet();
}
// all in bei nur wenigen Chips oder knappem raise
if(myCash/(2*actualHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
raise = myCash;
}
myAction = 5;
}
// extrem hoher set der gegner -> bluff beenden
if(actualHand->getTurn()->getHighestSet() >= 10*actualHand->getSmallBlind()) {
myAction = 1;
}
}
}
else {
if(sBluffStatus && myOdds < myNiveau[1]) {
// cout << "sBLUFF!" << endl;
myTool.getRandNumber(1,8,1,&rand,0);
bet = rand*actualHand->getSmallBlind();
// bet zu klein
if(bet == 0) {
bet = 2*actualHand->getSmallBlind();
}
// all in bei nur wenigen Chips
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
bet = myCash;
}
// all in bei knappem bet
if(bet > (myCash*4.0)/5.0) {
bet = myCash;
}
myAction = 4;
}
}
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
evaluation(bet, raise);
}
@@ -833,14 +958,16 @@ void LocalPlayer::riverEngine() {
int raise = 0;
int bet = 0;
int i;
Tools myTool;
int rand;
readFile();
// Niveaus setzen + Dude + Anzahl Gegenspieler
// 1. Fold -- Call
myNiveau[0] = 45 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
myNiveau[0] = 46 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 2. Check -- Bet
myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
myNiveau[1] = 54 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 3. Call -- Raise
myNiveau[2] = 66 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
@@ -941,6 +1068,67 @@ void LocalPlayer::riverEngine() {
}
// auf sBluffStatus testen --> raise statt call und bet statt check
// aktiv oder passiv?
if(actualHand->getRiver()->getHighestSet() > 0) {
if(sBluffStatus && myOdds < myNiveau[2]) {
// cout << "sBLUFF!" << endl;
// Gegner setzen -> call
if(actualHand->getRiver()->getHighestSet() >= 4*actualHand->getSmallBlind()) {
myAction = 3;
}
// Standard-Raise-Routine
else {
// raise-Betrag ermitteln
myTool.getRandNumber(1,8,1,&rand,0);
raise = rand*actualHand->getSmallBlind();
// raise-Betrag zu klein -> mindestens Standard-raise
if(raise < actualHand->getRiver()->getHighestSet()) {
raise = actualHand->getRiver()->getHighestSet();
}
// all in bei nur wenigen Chips oder knappem raise
if(myCash/(2*actualHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
raise = myCash;
}
myAction = 5;
}
// extrem hoher set der gegner -> bluff beenden
if(actualHand->getRiver()->getHighestSet() >= 10*actualHand->getSmallBlind()) {
myAction = 1;
}
}
}
else {
if(sBluffStatus && myOdds < myNiveau[1]) {
// cout << "sBLUFF!" << endl;
myTool.getRandNumber(1,8,1,&rand,0);
bet = rand*actualHand->getSmallBlind();
// bet zu klein
if(bet == 0) {
bet = 2*actualHand->getSmallBlind();
}
// all in bei nur wenigen Chips
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
bet = myCash;
}
// all in bei knappem bet
if(bet > (myCash*4.0)/5.0) {
bet = myCash;
}
myAction = 4;
}
}
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
evaluation(bet, raise);
@@ -1813,7 +2001,7 @@ void LocalPlayer::readFile() {
if(myOdds == -1) {
cout << "ERROR" << endl;
for(i=0; i<5; i++) cout << tempArray[i] << " ";
cout << "\t" << handCode << "\t" << myID << endl;
// cout << "\t" << handCode << "\t" << myID << endl;
} else {
// cout << myHoleCardsValue << endl;
}
+1 -1
View File
@@ -163,7 +163,7 @@ void LocalRiver::postRiverRun() {
// prüfen ob nur noch der human player an der verteilung teilnimmt und myAggressive für human player setzen
myHand->getPlayerArray()[0]->setMyAggressive(potPlayers == 1 && myHand->getPlayerArray()[0]->getMyActiveStatus() && myHand->getPlayerArray()[0]->getMyAction() != 1);
cout << "myAggressive: " << myHand->getPlayerArray()[0]->getMyAggressive() << endl;
// cout << "myAggressive: " << myHand->getPlayerArray()[0]->getMyAggressive() << endl;
// Pot-Verteilung
distributePot();
+1 -1
View File
@@ -45,7 +45,7 @@ p, li { white-space: pre-wrap; }
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Poker-Engine for the popular "Texas Holdem"-Poker&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Singleplayer-Modus&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Up to 4 Opponents&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Up to 6 Opponents&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Coded in C++ / QT4&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;">&lt;/p>
+6
View File
@@ -4058,11 +4058,17 @@
<property name="text" >
<string>Create Network Game ...</string>
</property>
<property name="visible" >
<bool>false</bool>
</property>
</action>
<action name="actionJoin_network_Game" >
<property name="text" >
<string>Join Network Game ...</string>
</property>
<property name="visible" >
<bool>false</bool>
</property>
</action>
<action name="actionFullScreen" >
<property name="text" >
+1 -1
View File
@@ -346,7 +346,7 @@ p, li { white-space: pre-wrap; }
<widget class="QComboBox" name="comboBox_engineVersion" >
<item>
<property name="text" >
<string>0.4 (actual - under development)</string>
<string>0.4 (actual)</string>
</property>
</item>
<item>
@@ -28,6 +28,10 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
setupUi(this);
stackedWidget->removeWidget(page_4);
listWidget->takeItem(2);
// page_4->hide();
playerNickIsChanged = FALSE;
//Formulare Füllen