fixes: "Bug ID 0000003: Low straight flush (with A) incorrectly picked" --> http://www.pokerth.net/mantis/view.php?id=3

This commit is contained in:
floty
2009-01-15 22:11:45 +00:00
parent 5abd134cb3
commit 97617753fa
3 changed files with 40 additions and 36 deletions
+16 -12
View File
@@ -283,20 +283,24 @@ int array[7][3];
return 800000000+array[j1][1]*1000000; return 800000000+array[j1][1]*1000000;
} }
} }
else { }
// Straight Flush Ausnahme: 5-4-3-2-A }
for(j2=j1+1; j2<4; 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]) { // Straight Flush Ausnahme: 5-4-3-2-A
// Straight Flush mit 5 als höchste Karte -> 8*100000000+3*1000000 for(j1=0; j1<3; j1++) {
if(position) { // 5 Karten gleiche Farbe ?
// Position-Array fuellen 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]) {
position[0] = array[j1][2]; for(j2=j1+1; j2<4; j2++) {
for(j3=1; j3<5; j3++) { 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]) {
position[j3] = array[j2+j3][2]; // Straight Flush mit 5 als höchste Karte -> 8*100000000+3*1000000
} if(position) {
// Position-Array fuellen
position[0] = array[j1][2];
for(j3=1; j3<5; j3++) {
position[j3] = array[j2+j3][2];
} }
return 800000000+3*1000000;
} }
return 800000000+3*1000000;
} }
} }
} }
+16 -16
View File
@@ -104,11 +104,11 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
case 1: { case 1: {
tempBoardArray[0] = 32; tempBoardArray[0] = 43;
tempBoardArray[1] = 24; tempBoardArray[1] = 27;
tempBoardArray[2] = 31; tempBoardArray[2] = 26;
tempBoardArray[3] = 47; tempBoardArray[3] = 29;
tempBoardArray[4] = 19; tempBoardArray[4] = 28;
myBoard->setMyCards(tempBoardArray); myBoard->setMyCards(tempBoardArray);
@@ -121,8 +121,8 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// player0 // player0
it = seatsList->begin(); it = seatsList->begin();
tempPlayerArray[0] = 12; tempPlayerArray[0] = 30;
tempPlayerArray[1] = 44; tempPlayerArray[1] = 38;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -199,15 +199,15 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// player6 // player6
it++; it++;
// tempPlayerArray[0] = 13; tempPlayerArray[0] = 22;
// tempPlayerArray[1] = 49; tempPlayerArray[1] = 41;
// tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[0] = tempPlayerArray[0];
// tempPlayerAndBoardArray[1] = tempPlayerArray[1]; tempPlayerAndBoardArray[1] = tempPlayerArray[1];
//
// (*it)->setMyCards(tempPlayerArray); (*it)->setMyCards(tempPlayerArray);
// (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
//
// (*it)->setMyBestHandPosition(temp5Array); (*it)->setMyBestHandPosition(temp5Array);
} break; } break;
+8 -8
View File
@@ -859,25 +859,25 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
switch(myUniqueID) { switch(myUniqueID) {
case 0: { case 0: {
myCash=3000; myCash=2000;
} break; } break;
case 1: { case 1: {
myCash=3000; myCash=0;
} break; } break;
case 2: { case 2: {
myCash=3000; myCash=0;
} break; } break;
case 3: { case 3: {
myCash=3000; myCash=0;
} break; } break;
case 4: { case 4: {
myCash=3000; myCash=0;
} break; } break;
case 5: { case 5: {
myCash=3000; myCash=0;
} break; } break;
case 6: { case 6: {
myCash=3000; myCash=1500;
} break; } break;
default: { default: {
} }
@@ -1372,7 +1372,7 @@ void LocalPlayer::preflopEngine() {
break; break;
case 6: { case 6: {
// if(mySet == 160) { // if(mySet == 160) {
myAction = PLAYER_ACTION_FOLD; myAction = PLAYER_ACTION_CALL;
// } // }
} }
break; break;