engine 0.4 rev13 (flop part 10)
This commit is contained in:
@@ -36,6 +36,10 @@ LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, int sC, bo
|
|||||||
myAverageSets[i] = 0;
|
myAverageSets[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// myAggressive initialisieren
|
||||||
|
for(i=0; i<10; i++) {
|
||||||
|
myAggressive[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Tools myTool;
|
Tools myTool;
|
||||||
// Dude zuweisen
|
// Dude zuweisen
|
||||||
@@ -668,26 +672,220 @@ void LocalPlayer::flopEngine() {
|
|||||||
int boardCards[5];
|
int boardCards[5];
|
||||||
int handCode;
|
int handCode;
|
||||||
|
|
||||||
int i;
|
int i,j,k;
|
||||||
|
|
||||||
|
|
||||||
for(i=0; i<2; i++) tempArray[i] = myCards[i];
|
for(i=0; i<2; i++) tempArray[i] = myCards[i];
|
||||||
actualBoard->getMyCards(boardCards);
|
actualBoard->getMyCards(boardCards);
|
||||||
for(i=0; i<3; i++) tempArray[2+i] = boardCards[i];
|
for(i=0; i<3; i++) tempArray[2+i] = boardCards[i];
|
||||||
|
|
||||||
cout << myID << ": ";
|
// cout << myID << ": ";
|
||||||
|
|
||||||
for(i=0; i<5; i++) cout << tempArray[i] << " ";
|
|
||||||
cout << "\t";
|
|
||||||
|
|
||||||
handCode = flopCardsValue(tempArray);
|
handCode = flopCardsValue(tempArray);
|
||||||
|
|
||||||
cout << "\t" << handCode << endl;
|
// cout << "\t" << handCode << endl;
|
||||||
|
|
||||||
|
std::string fileName = myConfig.readConfigString("DataDir")+"flopValues";
|
||||||
|
|
||||||
|
ifstream fin;
|
||||||
|
|
||||||
|
fin.open(fileName.c_str());
|
||||||
|
if(!fin) {
|
||||||
|
cout << "Es ist nicht möglich " << fileName << " zum lesen zu oeffnen." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(handCode != 80000) {
|
||||||
|
char buffer[50];
|
||||||
|
char hand[6];
|
||||||
|
hand[5] = '\0';
|
||||||
|
char preflopValue[8];
|
||||||
|
myHoleCardsValue = -1.;
|
||||||
|
while(fin.getline(buffer,50)) {
|
||||||
|
for(i=0; i<5; i++) hand[i] = buffer[i];
|
||||||
|
if(handCode == atoi(hand)) {
|
||||||
|
j = 0;
|
||||||
|
k = 2;
|
||||||
|
while(buffer[j] != '|' || k < actualHand->getActualQuantityPlayers()) {
|
||||||
|
if(buffer[j] == '|') k++;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
for(k=0; k<8 ; k++) preflopValue[k] = buffer[k+j+1];
|
||||||
|
myHoleCardsValue = 100*atof(preflopValue);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fin.close();
|
||||||
|
if(myHoleCardsValue == -1) {
|
||||||
|
cout << "ERROR" << endl;
|
||||||
|
for(i=0; i<5; i++) cout << tempArray[i] << " ";
|
||||||
|
cout << "\t" << handCode << "\t" << myID << endl;
|
||||||
|
} else {
|
||||||
|
// cout << myHoleCardsValue << endl;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
myHoleCardsValue = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
int raise = 0;
|
||||||
|
int bet = 0;
|
||||||
|
|
||||||
|
// Niveaus setzen + Dude + Anzahl Gegenspieler
|
||||||
|
// 1. Fold -- Call
|
||||||
|
myNiveau[0] = 40 + myDude4 - 6*(actualHand->getActualQuantityPlayers() - 2);
|
||||||
|
// 2. Check -- Bet
|
||||||
|
myNiveau[1] = 48 + myDude4 - 6*(actualHand->getActualQuantityPlayers() - 2);
|
||||||
|
// 3. Call -- Raise
|
||||||
|
myNiveau[2] = 53 + myDude4 - 6*(actualHand->getActualQuantityPlayers() - 2);
|
||||||
|
|
||||||
|
// Verhaeltnis Set / Cash
|
||||||
|
if(myCash/actualHand->getPreflop()->getHighestSet() >= 25) {
|
||||||
|
myNiveau[0] += (25-myCash/actualHand->getPreflop()->getHighestSet())/10;
|
||||||
|
} else {
|
||||||
|
myNiveau[0] += (25-myCash/actualHand->getPreflop()->getHighestSet())/3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// auf Aggresivität des humanPlayers eingehen
|
||||||
|
int aggValue = ( (50*(actualHand->getPlayerArray()[0]->getMyAverageSets()-6*actualHand->getSmallBlind())) / (actualHand->getStartQuantityPlayers()*actualHand->getStartCash() - 6*actualHand->getSmallBlind()) );
|
||||||
|
|
||||||
|
if(aggValue > 0) {
|
||||||
|
myNiveau[0] -= aggValue;
|
||||||
|
myNiveau[2] -= aggValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// aktive oder passivie Situation ? -> im preflop nur passiv
|
||||||
|
if(actualHand->getFlop()->getHighestSet() > 0) {
|
||||||
|
|
||||||
|
// raise (bei hohem Niveau)
|
||||||
|
if(myHoleCardsValue >= myNiveau[2]) {
|
||||||
|
|
||||||
|
// raise-loop unterbinden -> d.h. entweder call oder bei superblatt all in
|
||||||
|
if(actualHand->getFlop()->getHighestSet() >= 12*actualHand->getSmallBlind()) {
|
||||||
|
// all in
|
||||||
|
if(myHoleCardsValue >= myNiveau[2] + 8) {
|
||||||
|
raise = myCash;
|
||||||
|
myAction = 5;
|
||||||
|
}
|
||||||
|
// nur call
|
||||||
|
else {
|
||||||
|
myAction = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Standard-Raise-Routine
|
||||||
|
} else {
|
||||||
|
// raise-Betrag ermitteln
|
||||||
|
raise = (((int)myHoleCardsValue-myNiveau[2])/2)*2*actualHand->getSmallBlind();
|
||||||
|
// raise-Betrag zu klein -> mindestens Standard-raise
|
||||||
|
if(raise == 0) {
|
||||||
|
raise = actualHand->getFlop()->getHighestSet();
|
||||||
|
}
|
||||||
|
myAction = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// call
|
||||||
|
if(myHoleCardsValue >= myNiveau[0] || (mySet >= actualHand->getFlop()->getHighestSet()/2 && myHoleCardsValue >= myNiveau[0]-5)) {
|
||||||
|
// bigBlind --> check
|
||||||
|
if(myButton == 3 && mySet == actualHand->getFlop()->getHighestSet()) myAction = 2;
|
||||||
|
else myAction = 3;
|
||||||
|
}
|
||||||
|
// fold
|
||||||
|
else {
|
||||||
|
// bigBlind -> check
|
||||||
|
if(myButton == 3 && mySet == actualHand->getFlop()->getHighestSet()) myAction = 2;
|
||||||
|
else myAction = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// check
|
||||||
|
if(myHoleCardsValue < myNiveau[1]) {
|
||||||
|
myAction = 2;
|
||||||
|
}
|
||||||
|
// bet
|
||||||
|
else {
|
||||||
|
bet = (((int)myHoleCardsValue-myNiveau[1])/2)*2*actualHand->getSmallBlind();
|
||||||
|
// raise-Betrag zu klein -> mindestens Standard-raise
|
||||||
|
if(raise == 0) {
|
||||||
|
bet = 2*actualHand->getSmallBlind();
|
||||||
|
}
|
||||||
|
myAction = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auswertung
|
||||||
|
|
||||||
|
switch(myAction) {
|
||||||
|
// none
|
||||||
|
case 0: {}
|
||||||
|
break;
|
||||||
|
// fold
|
||||||
|
case 1: {}
|
||||||
|
break;
|
||||||
|
// check
|
||||||
|
case 2: {}
|
||||||
|
break;
|
||||||
|
// call
|
||||||
|
case 3: {
|
||||||
|
// all in
|
||||||
|
if(actualHand->getFlop()->getHighestSet() >= myCash) {
|
||||||
|
|
||||||
|
mySet += myCash;
|
||||||
|
myCash = 0;
|
||||||
|
myAction = 6;
|
||||||
|
|
||||||
|
}
|
||||||
|
// sonst
|
||||||
|
else {
|
||||||
|
myCash = myCash - actualHand->getFlop()->getHighestSet() + mySet;
|
||||||
|
mySet = actualHand->getFlop()->getHighestSet();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// bet
|
||||||
|
case 4: {
|
||||||
|
// all in
|
||||||
|
if(bet >= myCash) {
|
||||||
|
mySet += myCash;
|
||||||
|
myCash = 0;
|
||||||
|
myAction = 6;
|
||||||
|
actualHand->getFlop()->setHighestSet(mySet);
|
||||||
|
}
|
||||||
|
// sonst
|
||||||
|
else {
|
||||||
|
myCash = myCash - bet;
|
||||||
|
mySet = bet;
|
||||||
|
actualHand->getFlop()->setHighestSet(mySet);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// raise
|
||||||
|
case 5: {
|
||||||
|
// all in
|
||||||
|
if(actualHand->getFlop()->getHighestSet() + raise >= myCash) {
|
||||||
|
mySet += myCash;
|
||||||
|
myCash = 0;
|
||||||
|
myAction = 6;
|
||||||
|
if(mySet > actualHand->getFlop()->getHighestSet()) actualHand->getFlop()->setHighestSet(mySet);
|
||||||
|
}
|
||||||
|
// sonst
|
||||||
|
else {
|
||||||
|
myCash = myCash + mySet - actualHand->getFlop()->getHighestSet() - raise;
|
||||||
|
mySet = actualHand->getFlop()->getHighestSet() + raise;
|
||||||
|
actualHand->getFlop()->setHighestSet(mySet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// all in
|
||||||
|
case 6: {}
|
||||||
|
break;
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -956,8 +1154,8 @@ void LocalPlayer::flopEngine() {
|
|||||||
|
|
||||||
void LocalPlayer::turnEngine() {
|
void LocalPlayer::turnEngine() {
|
||||||
|
|
||||||
ConfigFile myConfig;
|
// ConfigFile myConfig;
|
||||||
if(myConfig.readConfigInt("EngineVersion")) {
|
// if(myConfig.readConfigInt("EngineVersion")) {
|
||||||
// cout << "Engine 0.3" << endl;
|
// cout << "Engine 0.3" << endl;
|
||||||
|
|
||||||
|
|
||||||
@@ -1124,26 +1322,26 @@ void LocalPlayer::turnEngine() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// }
|
||||||
// ################### ENGINE 0.4 #################
|
// // ################### ENGINE 0.4 #################
|
||||||
else {
|
// else {
|
||||||
// cout << "Engine 0.4" << endl;
|
// // cout << "Engine 0.4" << endl;
|
||||||
int tempArray[6];
|
// int tempArray[6];
|
||||||
int boardCards[5];
|
// int boardCards[5];
|
||||||
int i;
|
// int i;
|
||||||
|
//
|
||||||
for(i=0; i<2; i++) tempArray[i] = myCards[i];
|
// for(i=0; i<2; i++) tempArray[i] = myCards[i];
|
||||||
actualBoard->getMyCards(boardCards);
|
// actualBoard->getMyCards(boardCards);
|
||||||
for(i=0; i<4; i++) tempArray[2+i] = boardCards[i];
|
// for(i=0; i<4; i++) tempArray[2+i] = boardCards[i];
|
||||||
|
//
|
||||||
// for(i=0; i<5; i++) cout << tempArray[i] << " ";
|
// // for(i=0; i<5; i++) cout << tempArray[i] << " ";
|
||||||
// cout << endl;
|
// // cout << endl;
|
||||||
|
//
|
||||||
cout << myID << ": ";
|
// // cout << myID << ": ";
|
||||||
|
//
|
||||||
turnCardsValue(tempArray);
|
// turnCardsValue(tempArray);
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1396,18 +1594,18 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(array[0][0] == array[1][0] && array[0][0] == array[2][0] && array[0][0] == array[3][0] && array[0][0] == array[4][0]) {
|
if(array[0][0] == array[1][0] && array[0][0] == array[2][0] && array[0][0] == array[3][0] && array[0][0] == array[4][0]) {
|
||||||
// Straight Flush?
|
// Straight Flush?
|
||||||
if(array[0][1]-4 == array[4][1]) {
|
if(array[0][1]-4 == array[4][1]) {
|
||||||
cout << "Straight Flush";
|
// cout << "Straight Flush";
|
||||||
return 80000;
|
return 80000;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Straight Flush Ausnahme: 5-4-3-2-A
|
// Straight Flush Ausnahme: 5-4-3-2-A
|
||||||
if(array[0][1]==12 && array[1][1]==3 && array[2][1]==2 && array[3][1]==1 && array[4][1]==0) {
|
if(array[0][1]==12 && array[1][1]==3 && array[2][1]==2 && array[3][1]==1 && array[4][1]==0) {
|
||||||
cout << "Straight Flush Ass unten";
|
// cout << "Straight Flush Ass unten";
|
||||||
return 80000;
|
return 80000;
|
||||||
}
|
}
|
||||||
// Flush
|
// Flush
|
||||||
else {
|
else {
|
||||||
cout << "Flush";
|
// cout << "Flush";
|
||||||
return 80000;
|
return 80000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1421,7 +1619,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(array[j1][1]-3 == array[j1+3][1]) {
|
if(array[j1][1]-3 == array[j1+3][1]) {
|
||||||
// Strassenansatz am Rand?
|
// Strassenansatz am Rand?
|
||||||
if(array[j1][1] == 12) {
|
if(array[j1][1] == 12) {
|
||||||
cout << "zusammenhaengender Straight-Flush-Draw mit Ass high";
|
// cout << "zusammenhaengender Straight-Flush-Draw mit Ass high";
|
||||||
for(j2=0; j2<4; j2++) {
|
for(j2=0; j2<4; j2++) {
|
||||||
if(array[j1+j2][2] <= 1) temp++;
|
if(array[j1+j2][2] <= 1) temp++;
|
||||||
}
|
}
|
||||||
@@ -1429,7 +1627,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
}
|
}
|
||||||
// Strassenansatz in der Mitte
|
// Strassenansatz in der Mitte
|
||||||
else {
|
else {
|
||||||
cout << "zusammenhaengender Straight-Flush-Draw in der Mitte";
|
// cout << "zusammenhaengender Straight-Flush-Draw in der Mitte";
|
||||||
for(j2=0; j2<4; j2++) {
|
for(j2=0; j2<4; j2++) {
|
||||||
if(array[j1+j2][2] <= 1) temp++;
|
if(array[j1+j2][2] <= 1) temp++;
|
||||||
}
|
}
|
||||||
@@ -1439,7 +1637,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
else {
|
else {
|
||||||
// Bauchschuss ?
|
// Bauchschuss ?
|
||||||
if(array[j1][1]-4 == array[j1+3][1]) {
|
if(array[j1][1]-4 == array[j1+3][1]) {
|
||||||
cout << "Straight-Flush-Bauchschuss";
|
// cout << "Straight-Flush-Bauchschuss";
|
||||||
for(j2=0; j2<4; j2++) {
|
for(j2=0; j2<4; j2++) {
|
||||||
if(array[j1+j2][2] <= 1) temp++;
|
if(array[j1+j2][2] <= 1) temp++;
|
||||||
}
|
}
|
||||||
@@ -1448,7 +1646,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
else {
|
else {
|
||||||
// Test auf Straight-Flush-Ausnahme 5-4-3-2-A
|
// Test auf Straight-Flush-Ausnahme 5-4-3-2-A
|
||||||
if(array[j1][1] == 12 && (array[j1+1][1]<=3 || (array[j1+2][1]<=3 && array[j1][0]==array[j1+4][0]))) {
|
if(array[j1][1] == 12 && (array[j1+1][1]<=3 || (array[j1+2][1]<=3 && array[j1][0]==array[j1+4][0]))) {
|
||||||
cout << "Straight-Flush-Draw Ass unten";
|
// cout << "Straight-Flush-Draw Ass unten";
|
||||||
for(j2=0; j2<4; j2++) {
|
for(j2=0; j2<4; j2++) {
|
||||||
if(array[j1+j2][2] <= 1) temp++;
|
if(array[j1+j2][2] <= 1) temp++;
|
||||||
}
|
}
|
||||||
@@ -1456,7 +1654,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
}
|
}
|
||||||
// Flush Draw
|
// Flush Draw
|
||||||
else {
|
else {
|
||||||
cout << "Flush Draw";
|
// cout << "Flush Draw";
|
||||||
|
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
for(j2=0; j2<4; j2++) {
|
for(j2=0; j2<4; j2++) {
|
||||||
@@ -1521,7 +1719,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
// auf Vierling testen
|
// auf Vierling testen
|
||||||
for(j1=0; j1<2; j1++) {
|
for(j1=0; j1<2; j1++) {
|
||||||
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1] && array[j1][1] == array[j1+3][1]) {
|
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1] && array[j1][1] == array[j1+3][1]) {
|
||||||
cout << "Vierling ";
|
// cout << "Vierling ";
|
||||||
return 80000;
|
return 80000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1530,12 +1728,12 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
// auf Straight und Full House testen
|
// auf Straight und Full House testen
|
||||||
// Straight
|
// Straight
|
||||||
if((array[0][1]-1 == array[1][1] || array[0][1]-9 == array[1][1] ) && array[1][1]-1 == array[2][1] && array[2][1]-1 == array[3][1] && array[3][1]-1 == array[4][1]) {
|
if((array[0][1]-1 == array[1][1] || array[0][1]-9 == array[1][1] ) && array[1][1]-1 == array[2][1] && array[2][1]-1 == array[3][1] && array[3][1]-1 == array[4][1]) {
|
||||||
cout << "Straight";
|
// cout << "Straight";
|
||||||
return 80000;
|
return 80000;
|
||||||
}
|
}
|
||||||
// Full House
|
// Full House
|
||||||
if((array[0][1] == array[1][1] && array[0][1] == array[2][1] && array[3][1] == array[4][1]) || (array[2][1] == array[3][1] && array[2][1] == array[4][1] && array[0][1] == array[1][1])) {
|
if((array[0][1] == array[1][1] && array[0][1] == array[2][1] && array[3][1] == array[4][1]) || (array[2][1] == array[3][1] && array[2][1] == array[4][1] && array[0][1] == array[1][1])) {
|
||||||
cout << "Full House";
|
// cout << "Full House";
|
||||||
return 80000;
|
return 80000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1546,10 +1744,10 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
for(j3=j2+1; j3<5 && !breakLoop; j3++) {
|
for(j3=j2+1; j3<5 && !breakLoop; j3++) {
|
||||||
for(j4=j3+1; j4<5 && !breakLoop; j4++) {
|
for(j4=j3+1; j4<5 && !breakLoop; j4++) {
|
||||||
// zusammenhaengender Strassenansatz ?
|
// zusammenhaengender Strassenansatz ?
|
||||||
if((array[j1][1]-1 == array[j2][1] || array[j1][1]-9 == array[j2][1]) && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) {
|
if((array[j1][1]-1 == array[j2][1] || (array[j1][1]-9 == array[j2][1] && array[j1][1] == 12)) && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) {
|
||||||
// Strassenansatz am Rand?
|
// Strassenansatz am Rand?
|
||||||
if(array[j1][1] == 12) {
|
if(array[j1][1] == 12) {
|
||||||
cout << "zusammenhaengender Straight-Draw mit Ass high";
|
// cout << "zusammenhaengender Straight-Draw mit Ass high";
|
||||||
|
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
if(array[j1][2] <= 1) {
|
if(array[j1][2] <= 1) {
|
||||||
@@ -1574,13 +1772,13 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1595,13 +1793,13 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1613,7 +1811,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
}
|
}
|
||||||
// Strassenansatz in der Mitte
|
// Strassenansatz in der Mitte
|
||||||
else {
|
else {
|
||||||
cout << "zusammenhaengender Straight-Draw in der Mitte";
|
// cout << "zusammenhaengender Straight-Draw in der Mitte";
|
||||||
|
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
if(array[j1][2] <= 1) {
|
if(array[j1][2] <= 1) {
|
||||||
@@ -1638,13 +1836,13 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1659,13 +1857,13 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1691,7 +1889,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
else {
|
else {
|
||||||
// Bauchschuss ?
|
// Bauchschuss ?
|
||||||
if((array[j1][1]-2 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1])) {
|
if((array[j1][1]-2 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1])) {
|
||||||
cout << "Straight-Draw Bauchschuss";
|
// cout << "Straight-Draw Bauchschuss";
|
||||||
|
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
if(array[j1][2] <= 1) {
|
if(array[j1][2] <= 1) {
|
||||||
@@ -1716,13 +1914,13 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1737,13 +1935,13 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1767,8 +1965,8 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Test auf Straßenansatz-Ausnahme 5-4-3-2-A
|
// Test auf Straßenansatz-Ausnahme 5-4-3-2-A
|
||||||
if((array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-10 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1])) {
|
if(array[j1][1] == 12 && ((array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-10 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]))) {
|
||||||
cout << "Straight-Draw Ass unten";
|
// cout << "Straight-Draw Ass unten";
|
||||||
|
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
if(array[j1][2] <= 1) {
|
if(array[j1][2] <= 1) {
|
||||||
@@ -1793,19 +1991,19 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(temp1 >= 3) temp1 = 2;
|
if(temp1 >= 3) temp1 = 2;
|
||||||
|
|
||||||
tempValue = (40004 + temp1*2000);
|
tempValue = (40012 + temp1*2000);
|
||||||
}
|
}
|
||||||
// Anteil 1
|
// Anteil 1
|
||||||
else {
|
else {
|
||||||
@@ -1814,13 +2012,13 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(temp2Array[0] > array[j1][1]) {
|
if(temp2Array[0] > array[j1][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][2]) {
|
if(temp2Array[0] > array[j2][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][3]) {
|
if(temp2Array[0] > array[j3][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
if(temp2Array[0] > array[j1][4]) {
|
if(temp2Array[0] > array[j4][1]) {
|
||||||
temp1++;
|
temp1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1842,7 +2040,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
// auf Drilling testen
|
// auf Drilling testen
|
||||||
for(j1=0; j1<3; j1++) {
|
for(j1=0; j1<3; j1++) {
|
||||||
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1]) {
|
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1]) {
|
||||||
cout << "Drilling";
|
// cout << "Drilling";
|
||||||
for(j2=0; j2<3; j2++) {
|
for(j2=0; j2<3; j2++) {
|
||||||
if(array[j1+j2][2] <= 1) temp++;
|
if(array[j1+j2][2] <= 1) temp++;
|
||||||
}
|
}
|
||||||
@@ -1852,7 +2050,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
if(j1==0) {
|
if(j1==0) {
|
||||||
return (30000 + array[j1+3][1]);
|
return (30000 + array[j1+3][1]);
|
||||||
} else {
|
} else {
|
||||||
return (30100 + array[j1][1]);
|
return (30100 + array[0][1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1862,7 +2060,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
for(j1=0; j1<2; j1++) {
|
for(j1=0; j1<2; j1++) {
|
||||||
for(j2=j1+2; j2<4; j2++) {
|
for(j2=j1+2; j2<4; j2++) {
|
||||||
if(array[j1][1] == array[j1+1][1] && array[j2][1] == array[j2+1][1]) {
|
if(array[j1][1] == array[j1+1][1] && array[j2][1] == array[j2+1][1]) {
|
||||||
cout << "Zwei Paare";
|
// cout << "Zwei Paare";
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
for(j3=0; j3<2; j3++) {
|
for(j3=0; j3<2; j3++) {
|
||||||
if(array[j1+j3][2] <= 1) {
|
if(array[j1+j3][2] <= 1) {
|
||||||
@@ -1893,10 +2091,10 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
}
|
}
|
||||||
// Anteil 1
|
// Anteil 1
|
||||||
else {
|
else {
|
||||||
if(temp2Array[0] = array[j1][1]) {
|
if(temp2Array[0] == array[j1][1]) {
|
||||||
return 21100 + array[j1][1];
|
return 21100 + array[j1][1];
|
||||||
} else {
|
} else {
|
||||||
return 21000 + array[j1][1];
|
return 21000 + array[j2][1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1910,7 +2108,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
// auf Paar testen
|
// auf Paar testen
|
||||||
for(j1=0; j1<4; j1++) {
|
for(j1=0; j1<4; j1++) {
|
||||||
if(array[j1][1] == array[j1+1][1]) {
|
if(array[j1][1] == array[j1+1][1]) {
|
||||||
cout << "Paar";
|
// cout << "Paar";
|
||||||
// ohne Straight- und Flush-Draw
|
// ohne Straight- und Flush-Draw
|
||||||
if(!breakLoop) {
|
if(!breakLoop) {
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
@@ -1943,9 +2141,14 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// STraight (==4)
|
||||||
if(((int)(tempValue/10000)) == 4) {
|
if(((int)(tempValue/10000)) == 4) {
|
||||||
return (((int)(tempValue/1000))*1000 + 200+ (tempValue - ((int)(tempValue/100))*100));
|
return (((int)(tempValue/1000))*1000 + 200+ (tempValue - ((int)(tempValue/100))*100));
|
||||||
}
|
}
|
||||||
|
// Flush Anteil 1 (==5)
|
||||||
|
else {
|
||||||
|
return (((int)(tempValue/10000))*10000 + 3000 + (tempValue - ((int)(tempValue/1000))*1000));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1954,7 +2157,7 @@ int LocalPlayer::flopCardsValue(int* cards) {
|
|||||||
|
|
||||||
// ohne Straight- und Flush-Draw
|
// ohne Straight- und Flush-Draw
|
||||||
if(!breakLoop) {
|
if(!breakLoop) {
|
||||||
cout << "Highest Card";
|
// cout << "Highest Card";
|
||||||
// Anteil ermitteln
|
// Anteil ermitteln
|
||||||
for(j1=0; j1<5; j1++) {
|
for(j1=0; j1<5; j1++) {
|
||||||
if(array[j1][2] <= 1) {
|
if(array[j1][2] <= 1) {
|
||||||
@@ -2044,7 +2247,7 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
if(array[j1][0] == array[j1+1][0] && array[j1][0] == array[j1+2][0] && array[j1][0] == array[j1+3][0] && array[j1][0] == array[j1+4][0]) {
|
if(array[j1][0] == array[j1+1][0] && array[j1][0] == array[j1+2][0] && array[j1][0] == array[j1+3][0] && array[j1][0] == array[j1+4][0]) {
|
||||||
// Straight Flush?
|
// Straight Flush?
|
||||||
if(array[j1][1]-4 == array[j1+4][1]) {
|
if(array[j1][1]-4 == array[j1+4][1]) {
|
||||||
cout << "Straight Flush" << endl;
|
// cout << "Straight Flush" << endl;
|
||||||
// -> Sieg -> alles mitgehen
|
// -> Sieg -> alles mitgehen
|
||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
@@ -2052,7 +2255,7 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
// Straight Flush Ausnahme: 5-4-3-2-A
|
// Straight Flush Ausnahme: 5-4-3-2-A
|
||||||
for(j2=j1+1; j2<3; j2++) {
|
for(j2=j1+1; j2<3; j2++) {
|
||||||
if(array[j1][1]-9==array[j2][1] && array[j2][1]-1==array[j2+1][1] && array[j2+1][1]-1==array[j2+2][1] && array[j2+2][1]-1==array[j2+3][1] && array[j1][0]==array[j2+2][0] && array[j1][0]==array[j2+3][0]) {
|
if(array[j1][1]-9==array[j2][1] && array[j2][1]-1==array[j2+1][1] && array[j2+1][1]-1==array[j2+2][1] && array[j2+2][1]-1==array[j2+3][1] && array[j1][0]==array[j2+2][0] && array[j1][0]==array[j2+3][0]) {
|
||||||
cout << "Straight Flush Ass unten" << endl;
|
// cout << "Straight Flush Ass unten" << endl;
|
||||||
// -> fast sicherer Sieg -> alles mitgehen
|
// -> fast sicherer Sieg -> alles mitgehen
|
||||||
return 99;
|
return 99;
|
||||||
}
|
}
|
||||||
@@ -2064,7 +2267,7 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
// auf Flush testen
|
// auf Flush testen
|
||||||
for(j1=0; j1<2; j1++) {
|
for(j1=0; j1<2; j1++) {
|
||||||
if(array[j1][0] == array[j1+1][0] && array[j1][0] == array[j1+2][0] && array[j1][0] == array[j1+3][0] && array[j1][0] == array[j1+4][0]) {
|
if(array[j1][0] == array[j1+1][0] && array[j1][0] == array[j1+2][0] && array[j1][0] == array[j1+3][0] && array[j1][0] == array[j1+4][0]) {
|
||||||
cout << "Flush" << endl;
|
// cout << "Flush" << endl;
|
||||||
// -> sehr gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
// -> sehr gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
||||||
return 70;
|
return 70;
|
||||||
}
|
}
|
||||||
@@ -2079,30 +2282,30 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
if(array[j1][1]-3 == array[j1+3][1]) {
|
if(array[j1][1]-3 == array[j1+3][1]) {
|
||||||
// Strassenansatz am Rand?
|
// Strassenansatz am Rand?
|
||||||
if(array[j1][1] == 12) {
|
if(array[j1][1] == 12) {
|
||||||
cout << "zusammenhaengender Straight-Flush-Draw mit Ass high ";
|
// cout << "zusammenhaengender Straight-Flush-Draw mit Ass high ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Strassenansatz in der Mitte
|
// Strassenansatz in der Mitte
|
||||||
else {
|
else {
|
||||||
cout << "zusammenhaengender Straight-Flush-Draw in der Mitte ";
|
// cout << "zusammenhaengender Straight-Flush-Draw in der Mitte ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Bauchschuss ?
|
// Bauchschuss ?
|
||||||
if(array[j1][1]-4 == array[j1+3][1]) {
|
if(array[j1][1]-4 == array[j1+3][1]) {
|
||||||
cout << "Straight-Flush-Bauchschuss ";
|
// cout << "Straight-Flush-Bauchschuss ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Test auf Straight-Flush-Ausnahme 5-4-3-2-A
|
// Test auf Straight-Flush-Ausnahme 5-4-3-2-A
|
||||||
if(array[j1][1] == 12 && (array[j1+1][1]<=3 || (array[j1+2][1]<=3 && array[j1][0]==array[j1+4][0]) || (array[j1+3][1]<=3 && array[j1][0]==array[j1+4][0] && array[j1][0]==array[j1+4][0]))) {
|
if(array[j1][1] == 12 && (array[j1+1][1]<=3 || (array[j1+2][1]<=3 && array[j1][0]==array[j1+4][0]) || (array[j1+3][1]<=3 && array[j1][0]==array[j1+4][0] && array[j1][0]==array[j1+4][0]))) {
|
||||||
cout << "Straight-Flush-Draw Ass unten ";
|
// cout << "Straight-Flush-Draw Ass unten ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Flush Draw
|
// Flush Draw
|
||||||
else {
|
else {
|
||||||
cout << "Flush Draw ";
|
// cout << "Flush Draw ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2131,7 +2334,7 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
// auf Vierling testen
|
// auf Vierling testen
|
||||||
for(j1=0; j1<3; j1++) {
|
for(j1=0; j1<3; j1++) {
|
||||||
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1] && array[j1][1] == array[j1+3][1]) {
|
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1] && array[j1][1] == array[j1+3][1]) {
|
||||||
cout << "Vierling" << endl;
|
// cout << "Vierling" << endl;
|
||||||
// -> Sieg (nur von Sraight Flush schlagbar) -> alles mitgehn
|
// -> Sieg (nur von Sraight Flush schlagbar) -> alles mitgehn
|
||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
@@ -2146,13 +2349,13 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
for(j5=j4+1; j5<6; j5++) {
|
for(j5=j4+1; j5<6; j5++) {
|
||||||
// Straight
|
// Straight
|
||||||
if((array[j1][1]-1 == array[j2][1] || array[j1][1]-9 == array[j2][1] ) && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1] && array[j4][1]-1 == array[j5][1]) {
|
if((array[j1][1]-1 == array[j2][1] || array[j1][1]-9 == array[j2][1] ) && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1] && array[j4][1]-1 == array[j5][1]) {
|
||||||
cout << "Straight" << endl;
|
// cout << "Straight" << endl;
|
||||||
// -> super Blatt -> auf andere achten
|
// -> super Blatt -> auf andere achten
|
||||||
return 70;
|
return 70;
|
||||||
}
|
}
|
||||||
// Full House
|
// Full House
|
||||||
if((array[j1][1] == array[j2][1] && array[j1][1] == array[j3][1] && array[j4][1] == array[j5][1]) || (array[j3][1] == array[j4][1] && array[j3][1] == array[j5][1] && array[j1][1] == array[j2][1])) {
|
if((array[j1][1] == array[j2][1] && array[j1][1] == array[j3][1] && array[j4][1] == array[j5][1]) || (array[j3][1] == array[j4][1] && array[j3][1] == array[j5][1] && array[j1][1] == array[j2][1])) {
|
||||||
cout << "Full House" << endl;
|
// cout << "Full House" << endl;
|
||||||
// -> super Blatt -> auf andere achten
|
// -> super Blatt -> auf andere achten
|
||||||
return 70;
|
return 70;
|
||||||
}
|
}
|
||||||
@@ -2171,25 +2374,25 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
if(array[j1][1]-1 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) {
|
if(array[j1][1]-1 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) {
|
||||||
// Strassenansatz am Rand?
|
// Strassenansatz am Rand?
|
||||||
if(array[j1][1] == 12) {
|
if(array[j1][1] == 12) {
|
||||||
cout << "zusammenhaengender Straight-Draw mit Ass high ";
|
// cout << "zusammenhaengender Straight-Draw mit Ass high ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Strassenansatz in der Mitte
|
// Strassenansatz in der Mitte
|
||||||
else {
|
else {
|
||||||
cout << "zusammenhaengender Straight-Draw in der Mitte ";
|
// cout << "zusammenhaengender Straight-Draw in der Mitte ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Bauchschuss ?
|
// Bauchschuss ?
|
||||||
if((array[j1][1]-2 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1])) {
|
if((array[j1][1]-2 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-1 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1])) {
|
||||||
cout << "Straight-Bauchschuss ";
|
// cout << "Straight-Bauchschuss ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Test auf Straßenansatz-Ausnahme 5-4-3-2-A
|
// Test auf Straßenansatz-Ausnahme 5-4-3-2-A
|
||||||
if((array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-10 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1])) {
|
if((array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-2 == array[j4][1]) || (array[j1][1]-9 == array[j2][1] && array[j2][1]-2 == array[j3][1] && array[j3][1]-1 == array[j4][1]) || (array[j1][1]-10 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1])) {
|
||||||
cout << "Straight-Draw Ass unten ";
|
// cout << "Straight-Draw Ass unten ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2203,7 +2406,7 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
// auf Drilling testen
|
// auf Drilling testen
|
||||||
for(j1=0; j1<4; j1++) {
|
for(j1=0; j1<4; j1++) {
|
||||||
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1]) {
|
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1]) {
|
||||||
cout << "Drilling" << endl;
|
// cout << "Drilling" << endl;
|
||||||
// -> gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
// -> gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
@@ -2213,7 +2416,7 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
for(j1=0; j1<3; j1++) {
|
for(j1=0; j1<3; j1++) {
|
||||||
for(j2=j1+2; j2<5; j2++) {
|
for(j2=j1+2; j2<5; j2++) {
|
||||||
if(array[j1][1] == array[j1+1][1] && array[j2][1] == array[j2+1][1]) {
|
if(array[j1][1] == array[j1+1][1] && array[j2][1] == array[j2+1][1]) {
|
||||||
cout << "Zwei Paare" << endl;
|
// cout << "Zwei Paare" << endl;
|
||||||
// -> gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
// -> gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
||||||
return 40;
|
return 40;
|
||||||
}
|
}
|
||||||
@@ -2223,14 +2426,14 @@ int LocalPlayer::turnCardsValue(int* cards) {
|
|||||||
// auf Paar testen
|
// auf Paar testen
|
||||||
for(j1=0; j1<5; j1++) {
|
for(j1=0; j1<5; j1++) {
|
||||||
if(array[j1][1] == array[j1+1][1]) {
|
if(array[j1][1] == array[j1+1][1]) {
|
||||||
cout << "Paar" << endl;
|
// cout << "Paar" << endl;
|
||||||
// -> gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
// -> gutes Blatt -> eigenen Anteil ermitteln und auf andere achten
|
||||||
return 30;
|
return 30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Highest Card (Klasse 0) + Kicker
|
// Highest Card (Klasse 0) + Kicker
|
||||||
cout << endl;
|
// cout << endl;
|
||||||
return 10;
|
return 10;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,21 @@ public:
|
|||||||
void setMyAverageSets(const int& theValue) { myAverageSets[0] = myAverageSets[1]; myAverageSets[1] = myAverageSets[2]; myAverageSets[2] = myAverageSets[3]; myAverageSets[3] = theValue; }
|
void setMyAverageSets(const int& theValue) { myAverageSets[0] = myAverageSets[1]; myAverageSets[1] = myAverageSets[2]; myAverageSets[2] = myAverageSets[3]; myAverageSets[3] = theValue; }
|
||||||
int getMyAverageSets() const { return (myAverageSets[0]+myAverageSets[1]+myAverageSets[2]+myAverageSets[3])/4; }
|
int getMyAverageSets() const { return (myAverageSets[0]+myAverageSets[1]+myAverageSets[2]+myAverageSets[3])/4; }
|
||||||
|
|
||||||
|
void setMyAggressive(const bool& theValue) {
|
||||||
|
int i;
|
||||||
|
for(i=0; i<9; i++) {
|
||||||
|
myAggressive[i] = myAggressive[i+1];
|
||||||
|
}
|
||||||
|
myAggressive[9] = theValue;
|
||||||
|
}
|
||||||
|
int getMyAggressive() const {
|
||||||
|
int i, sum = 0;
|
||||||
|
for(i=0; i<10; i++) {
|
||||||
|
sum += myAggressive[i];
|
||||||
|
}
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
void action();
|
void action();
|
||||||
|
|
||||||
void preflopEngine();
|
void preflopEngine();
|
||||||
@@ -128,6 +143,7 @@ private:
|
|||||||
int myRoundStartCash;
|
int myRoundStartCash;
|
||||||
|
|
||||||
int myAverageSets[4];
|
int myAverageSets[4];
|
||||||
|
bool myAggressive[10];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/data" >
|
<qresource prefix="/data" >
|
||||||
<file>resources/data/preflopValues</file>
|
<file>resources/data/preflopValues</file>
|
||||||
|
<file>resources/data/flopValues</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/fonts" >
|
<qresource prefix="/fonts" >
|
||||||
<file>resources/fonts/andybold.ttf</file>
|
<file>resources/fonts/andybold.ttf</file>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
02410|0.365463|0.188500|0.121275|0.093100
|
02410|0.365463|0.188500|0.121275|0.093100
|
||||||
03410|0.386962|0.214933|0.151325|0.119000
|
03410|0.386962|0.214933|0.151325|0.119000
|
||||||
00111|0.191887|0.074800|0.036500|0.023150
|
00111|0.191887|0.074800|0.036500|0.023150
|
||||||
00111|0.197437|0.074633|0.038425|0.021600
|
00211|0.197437|0.074633|0.038425|0.021600
|
||||||
00311|0.279463|0.118717|0.068550|0.045300
|
00311|0.279463|0.118717|0.068550|0.045300
|
||||||
00411|0.375588|0.179217|0.106850|0.074700
|
00411|0.375588|0.179217|0.106850|0.074700
|
||||||
01211|0.226475|0.101767|0.058650|0.037050
|
01211|0.226475|0.101767|0.058650|0.037050
|
||||||
@@ -68,6 +68,13 @@
|
|||||||
02312|0.422438|0.215050|0.133150|0.089900
|
02312|0.422438|0.215050|0.133150|0.089900
|
||||||
02412|0.498025|0.283417|0.184950|0.133700
|
02412|0.498025|0.283417|0.184950|0.133700
|
||||||
03412|0.509725|0.303550|0.211825|0.153700
|
03412|0.509725|0.303550|0.211825|0.153700
|
||||||
|
10201|0.277375|0.133517|0.076325|0.042900
|
||||||
|
10102|0.317775|0.177483|0.112400|0.077850
|
||||||
|
10202|0.291087|0.147300|0.085675|0.051200
|
||||||
|
10103|0.328775|0.179900|0.113375|0.079500
|
||||||
|
10203|0.295988|0.150617|0.089500|0.056800
|
||||||
|
10104|0.315550|0.168617|0.103550|0.068600
|
||||||
|
10204|0.308200|0.155367|0.093075|0.056450
|
||||||
10005|0.270150|0.170433|0.124725|0.096250
|
10005|0.270150|0.170433|0.124725|0.096250
|
||||||
10105|0.296262|0.172950|0.126950|0.095050
|
10105|0.296262|0.172950|0.126950|0.095050
|
||||||
10205|0.336438|0.172217|0.103250|0.068550
|
10205|0.336438|0.172217|0.103250|0.068550
|
||||||
@@ -127,7 +134,7 @@
|
|||||||
12301|0.460913|0.241117|0.145000|0.097950
|
12301|0.460913|0.241117|0.145000|0.097950
|
||||||
12102|0.641775|0.424583|0.289350|0.206500
|
12102|0.641775|0.424583|0.289350|0.206500
|
||||||
12202|0.565462|0.330867|0.212075|0.148150
|
12202|0.565462|0.330867|0.212075|0.148150
|
||||||
12202|0.481162|0.253533|0.154325|0.106450
|
12302|0.481162|0.253533|0.154325|0.106450
|
||||||
12103|0.655763|0.442417|0.305875|0.222850
|
12103|0.655763|0.442417|0.305875|0.222850
|
||||||
12203|0.576050|0.347733|0.221600|0.146250
|
12203|0.576050|0.347733|0.221600|0.146250
|
||||||
12303|0.499538|0.274933|0.163900|0.111500
|
12303|0.499538|0.274933|0.163900|0.111500
|
||||||
@@ -242,11 +249,12 @@
|
|||||||
30112|0.715350|0.528400|0.403125|0.326600
|
30112|0.715350|0.528400|0.403125|0.326600
|
||||||
41104|0.311063|0.191417|0.143925|0.111150
|
41104|0.311063|0.191417|0.143925|0.111150
|
||||||
41204|0.622650|0.408700|0.282950|0.208600
|
41204|0.622650|0.408700|0.282950|0.208600
|
||||||
|
41005|0.241925|0.148983|0.109150|0.078200
|
||||||
41105|0.353787|0.204000|0.147650|0.110350
|
41105|0.353787|0.204000|0.147650|0.110350
|
||||||
41205|0.637350|0.427133|0.301150|0.219250
|
41205|0.637350|0.427133|0.301150|0.219250
|
||||||
41006|0.262412|0.162067|0.120525|0.091800
|
41006|0.262412|0.162067|0.120525|0.091800
|
||||||
41106|0.374837|0.216017|0.156400|0.121500
|
41106|0.374837|0.216017|0.156400|0.121500
|
||||||
41106|0.654100|0.446733|0.315550|0.227350
|
41206|0.654100|0.446733|0.315550|0.227350
|
||||||
41007|0.281788|0.166167|0.119675|0.090250
|
41007|0.281788|0.166167|0.119675|0.090250
|
||||||
41107|0.417137|0.238983|0.166225|0.126500
|
41107|0.417137|0.238983|0.166225|0.126500
|
||||||
41207|0.673787|0.468433|0.336425|0.245300
|
41207|0.673787|0.468433|0.336425|0.245300
|
||||||
@@ -283,6 +291,7 @@
|
|||||||
42212|0.774487|0.610033|0.485250|0.399300
|
42212|0.774487|0.610033|0.485250|0.399300
|
||||||
43104|0.409863|0.271383|0.221500|0.193500
|
43104|0.409863|0.271383|0.221500|0.193500
|
||||||
43204|0.674612|0.484033|0.367575|0.292950
|
43204|0.674612|0.484033|0.367575|0.292950
|
||||||
|
43005|0.273612|0.200917|0.165400|0.149900
|
||||||
43105|0.417563|0.270517|0.221725|0.195200
|
43105|0.417563|0.270517|0.221725|0.195200
|
||||||
43205|0.684512|0.498017|0.378375|0.305750
|
43205|0.684512|0.498017|0.378375|0.305750
|
||||||
43006|0.309837|0.220700|0.186450|0.170800
|
43006|0.309837|0.220700|0.186450|0.170800
|
||||||
@@ -461,7 +470,8 @@
|
|||||||
51206|0.539750|0.360683|0.267825|0.211450
|
51206|0.539750|0.360683|0.267825|0.211450
|
||||||
51207|0.554500|0.388600|0.299900|0.248550
|
51207|0.554500|0.388600|0.299900|0.248550
|
||||||
51208|0.653900|0.502500|0.419550|0.360150
|
51208|0.653900|0.502500|0.419550|0.360150
|
||||||
51209|0.711688|0.556217|0.469275|0.416300
|
51209|0.651688|0.606217|0.429275|0.486300
|
||||||
|
51210|0.663737|0.510117|0.430075|0.395050
|
||||||
51300|0.374575|0.212500|0.133100|0.085400
|
51300|0.374575|0.212500|0.133100|0.085400
|
||||||
51301|0.393663|0.236817|0.155525|0.107650
|
51301|0.393663|0.236817|0.155525|0.107650
|
||||||
51302|0.433300|0.261867|0.177925|0.122250
|
51302|0.433300|0.261867|0.177925|0.122250
|
||||||
@@ -540,6 +550,7 @@
|
|||||||
60105|0.449263|0.372250|0.329725|0.301050
|
60105|0.449263|0.372250|0.329725|0.301050
|
||||||
60106|0.457888|0.371467|0.331025|0.305750
|
60106|0.457888|0.371467|0.331025|0.305750
|
||||||
60107|0.465225|0.372783|0.327575|0.301500
|
60107|0.465225|0.372783|0.327575|0.301500
|
||||||
|
60108|0.465237|0.376017|0.326300|0.306300
|
||||||
60109|0.463462|0.373900|0.327375|0.300650
|
60109|0.463462|0.373900|0.327375|0.300650
|
||||||
60110|0.484550|0.380033|0.334850|0.306000
|
60110|0.484550|0.380033|0.334850|0.306000
|
||||||
60111|0.498262|0.383467|0.334500|0.309250
|
60111|0.498262|0.383467|0.334500|0.309250
|
||||||
@@ -619,4 +630,4 @@
|
|||||||
71209|0.636775|0.532250|0.486750|0.450400
|
71209|0.636775|0.532250|0.486750|0.450400
|
||||||
71210|0.672350|0.555367|0.499375|0.463250
|
71210|0.672350|0.555367|0.499375|0.463250
|
||||||
71211|0.709275|0.580383|0.527200|0.483850
|
71211|0.709275|0.580383|0.527200|0.483850
|
||||||
71212|0.751687|0.628100|0.560100|0.516900
|
71212|0.751687|0.628100|0.560100|0.516900
|
||||||
|
|||||||
Reference in New Issue
Block a user