debugging

This commit is contained in:
floty
2007-08-24 15:15:01 +00:00
parent 0ae607a832
commit 530d78bd28
2 changed files with 37 additions and 20 deletions
+18 -13
View File
@@ -31,7 +31,6 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
cardsShown(false), bettingRoundsPlayed(0) cardsShown(false), bettingRoundsPlayed(0)
{ {
int i, j, k; int i, j, k;
CardsValue myCardsValue; CardsValue myCardsValue;
@@ -104,11 +103,11 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
int temp5Array[5]; int temp5Array[5];
tempBoardArray[0] = 28; tempBoardArray[0] = 25;
tempBoardArray[1] = 45; tempBoardArray[1] = 37;
tempBoardArray[2] = 33; tempBoardArray[2] = 20;
tempBoardArray[3] = 4; tempBoardArray[3] = 49;
tempBoardArray[4] = 49; tempBoardArray[4] = 39;
myBoard->setMyCards(tempBoardArray); myBoard->setMyCards(tempBoardArray);
@@ -118,8 +117,10 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
tempPlayerAndBoardArray[5] = tempBoardArray[3]; tempPlayerAndBoardArray[5] = tempBoardArray[3];
tempPlayerAndBoardArray[6] = tempBoardArray[4]; tempPlayerAndBoardArray[6] = tempBoardArray[4];
tempPlayerArray[0] = 47; // player0
tempPlayerArray[1] = 12;
tempPlayerArray[0] = 0;
tempPlayerArray[1] = 7;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -133,8 +134,10 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// } // }
// cout << endl; // cout << endl;
tempPlayerArray[0] = 31; // player1
tempPlayerArray[1] = 18;
tempPlayerArray[0] = 51;
tempPlayerArray[1] = 24;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -143,8 +146,10 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
playerArray[1]->setMyBestHandPosition(temp5Array); playerArray[1]->setMyBestHandPosition(temp5Array);
tempPlayerArray[0] = 24; // player2
tempPlayerArray[1] = 48;
tempPlayerArray[0] = 13;
tempPlayerArray[1] = 43;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -168,7 +173,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// } // }
dealerPosition = 0; dealerPosition = 2;
} }
+18 -6
View File
@@ -36,17 +36,17 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
if(myID==0) { if(myID==0) {
// myActiveStatus=0; // myActiveStatus=0;
myCash=570; // myCash=570;
} }
if(myID==1) { if(myID==1) {
myCash=2730; // myCash=2730;
} }
if(myID==2) { if(myID==2) {
myCash=5970; // myCash=5970;
} }
if(myID==3) { if(myID==3) {
myCash=2730; // myCash=2730;
} }
} }
@@ -343,9 +343,21 @@ void LocalPlayer::preflopEngine() {
switch(myID) { switch(myID) {
case 0: {} case 0: {}
break; break;
case 1: { myAction = PLAYER_ACTION_FOLD; } case 1: {
switch(actualHand->getMyID()) {
case 2: {
myAction = PLAYER_ACTION_RAISE;
raise = 120;
}
break; break;
case 2: { myAction = PLAYER_ACTION_CALL; } default: {
}
}
}
break;
case 2: { myAction = PLAYER_ACTION_FOLD; }
break; break;
case 3: { myAction = PLAYER_ACTION_FOLD; } case 3: { myAction = PLAYER_ACTION_FOLD; }
break; break;