This commit is contained in:
doitux
2007-03-20 00:41:39 +00:00
parent 7d7e841c14
commit be37505d94
2 changed files with 227 additions and 4 deletions
+226 -3
View File
@@ -666,7 +666,14 @@ void LocalPlayer::flopEngine() {
int tempArray[5];
int boardCards[5];
int info[4];
int cBluff;
int sBluff;
int bet = 0;
int raise = 0;
int i;
Tools myTools;
for(i=0; i<2; i++) tempArray[i] = myCards[i];
actualBoard->getMyCards(boardCards);
@@ -684,7 +691,219 @@ void LocalPlayer::flopEngine() {
// aktive Situation --> check / bet
if(actualHand->getFlop()->getHighestSet() == 0) {
switch(info[0]) {
case 9: {}
case 8: {}
case 7: {}
case 6: {}
case 5: {}
case 4: {
myTools.getRandNumber(0,100,1,&cBluff,0);
if(cBluff < 35) {
myAction = 2;
}
else {
if(myCash/(2*actualHand->getSmallBlind()) <= 8) {
myAction = 6;
} else {
if(cBluff < 60) {
bet = (7-myDude4)*2*actualHand->getSmallBlind();
} else {
bet = (((100-cBluff)/20)+2)*actualHand->getSmallBlind();
}
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
}
}
break;
case 3: {
switch(info[3]) {
case 2: {
myTools.getRandNumber(0,100,1,&cBluff,0);
if(cBluff < 35) {
myAction = 2;
}
else {
if(myCash/(2*actualHand->getSmallBlind()) <= 8) {
myAction = 6;
} else {
if(cBluff < 60) {
bet = (5-myDude4)*2*actualHand->getSmallBlind();
} else {
bet = (((100-cBluff)/20)+2)*actualHand->getSmallBlind();
}
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
}
}
break;
case 1: {
myTools.getRandNumber(0,100,1,&cBluff,0);
if(cBluff < 40) {
myAction = 2;
}
else {
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
myAction = 6;
} else {
if(cBluff < 60) {
bet = (3-myDude4)*2*actualHand->getSmallBlind();
} else {
bet = (((100-cBluff)/20)+2)*actualHand->getSmallBlind();
}
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
}
}
break;
default: {
myTools.getRandNumber(0,100,1,&sBluff,0);
if(info[1] >= 10 && sBluff <= 40) {
bet = (sBluff/10)*2*actualHand->getSmallBlind();
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
else {
myAction = 2;
}
}
}
}
break;
case 2: {
switch(info[3]) {
case 2: {
myTools.getRandNumber(0,100,1,&cBluff,0);
if(cBluff > 80) {
myAction = 2;
}
else {
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
myAction = 6;
} else {
bet = (cBluff/20)*2*actualHand->getSmallBlind();
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
}
}
break;
default: {
myTools.getRandNumber(0,100,1,&cBluff,0);
if(cBluff > 90) {
myAction = 2;
}
else {
if(myCash/(2*actualHand->getSmallBlind()) <= 5) {
myAction = 6;
} else {
bet = (cBluff/30)*2*actualHand->getSmallBlind();
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
}
}
}
}
break;
case 1: {
if(!info[2]) {
myTools.getRandNumber(0,100,1,&sBluff,0);
switch(info[3]) {
case 2: {}
case 1: {
if(actualHand->getActualQuantityPlayers() == 2) {
bet = (1-myDude4)*2*actualHand->getSmallBlind();
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
else {
switch(info[1]) {
case 3: {
if(sBluff <= 10) {
bet = (sBluff/5 + 2)*actualHand->getSmallBlind();
myAction = 4;
}
else {
myAction = 2;
}
}
break;
case 2: {
if(sBluff <= 15) {
bet = (sBluff/5 + 2)*actualHand->getSmallBlind();
myAction = 4;
}
else {
myAction = 2;
}
}
break;
case 1: {
if(sBluff <= 50) {
bet = (sBluff/15 + 2)*actualHand->getSmallBlind();
myAction = 4;
}
else {
myAction = 2;
}
}
break;
default: {
if(myCash/(2*actualHand->getSmallBlind()) <= 5) {
myAction = 6;
} else {
bet = (sBluff/15)*2*actualHand->getSmallBlind();
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
}
break;
}
}
}
break;
default: {
if(sBluff > 90) {
myAction = 2;
}
else {
if(myCash/(2*actualHand->getSmallBlind()) <= 5) {
myAction = 6;
} else {
bet = (cBluff/30)*2*actualHand->getSmallBlind();
if(bet < 2*actualHand->getSmallBlind()) bet = 2*actualHand->getSmallBlind();
myAction = 4;
}
}
}
}
}
}
break;
default: {}
}
@@ -1356,7 +1575,8 @@ int LocalPlayer::flopCardsValue(int* cards, int* info) {
for(j1=0; j1<3; j1++) {
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1]) {
info[0] = 3;
info[1] = array[j1][1];
if(j1==0) info[1] = array[3][1];
else info[1] = array[0][1];
for(j2=0; j2<3; j2++) {
if(array[j1+j2][2] <= 1) info[3]++;
}
@@ -1385,11 +1605,14 @@ int LocalPlayer::flopCardsValue(int* cards, int* info) {
for(j1=0; j1<4; j1++) {
if(array[j1][1] == array[j1+1][1]) {
info[0] = 1;
info[1] = array[j1][1];
info[1] = 0;
for(j2=0; j2<5; j2++) {
if(array[j2][2] >= 2 && array[j2][1] > array[j1][1]) info[1]++;
}
for(j2=0; j2<2; j2++) {
if(array[j1+j2][2] <= 1) info[3]++;
}
cout << "Paar " << info[3] << endl;
cout << "Paar " << info[1] << "\t" << info[3] << endl;
return 0;
}
}