adds activePlayerList and runningPlayerList (XXV) - bugfixes

This commit is contained in:
doitux
2007-09-29 17:08:05 +00:00
parent 45774f4b75
commit 6e795d99d5
5 changed files with 74 additions and 31 deletions
+27 -14
View File
@@ -112,10 +112,10 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
case 1: { case 1: {
/* tempBoardArray[0] = 27; tempBoardArray[0] = 22;
tempBoardArray[1] = 37; tempBoardArray[1] = 15;
tempBoardArray[2] = 45; tempBoardArray[2] = 24;
tempBoardArray[3] = 51; tempBoardArray[3] = 30;
tempBoardArray[4] = 23; tempBoardArray[4] = 23;
myBoard->setMyCards(tempBoardArray); myBoard->setMyCards(tempBoardArray);
@@ -124,7 +124,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
tempPlayerAndBoardArray[3] = tempBoardArray[1]; tempPlayerAndBoardArray[3] = tempBoardArray[1];
tempPlayerAndBoardArray[4] = tempBoardArray[2]; tempPlayerAndBoardArray[4] = tempBoardArray[2];
tempPlayerAndBoardArray[5] = tempBoardArray[3]; tempPlayerAndBoardArray[5] = tempBoardArray[3];
tempPlayerAndBoardArray[6] = tempBoardArray[4];*/ tempPlayerAndBoardArray[6] = tempBoardArray[4];
// player0 // player0
it = seatsList->begin(); it = seatsList->begin();
@@ -155,15 +155,15 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// player2 // player2
it++; it++;
// tempPlayerArray[0] = 25; tempPlayerArray[0] = 35;
// tempPlayerArray[1] = 36; tempPlayerArray[1] = 18;
// 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);
// player3 // player3
it++; it++;
@@ -204,6 +204,19 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// //
// (*it)->setMyBestHandPosition(temp5Array); // (*it)->setMyBestHandPosition(temp5Array);
// player6
it++;
tempPlayerArray[0] = 13;
tempPlayerArray[1] = 49;
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
(*it)->setMyCards(tempPlayerArray);
(*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
(*it)->setMyBestHandPosition(temp5Array);
} break; } break;
case 2: { case 2: {
+43 -13
View File
@@ -860,22 +860,22 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
myCash=0; myCash=0;
} break; } break;
case 1: { case 1: {
myCash=0; myCash=3120;
} break; } break;
case 2: { case 2: {
myCash=0; myCash=11280;
} break; } break;
case 3: { case 3: {
myCash=0; myCash=3550;
} break; } break;
case 4: { case 4: {
myCash=10040; myCash=3020;
} break; } break;
case 5: { case 5: {
myCash=0; myCash=0;
} break; } break;
case 6: { case 6: {
myCash=10960; myCash=30;
} break; } break;
default: { default: {
} }
@@ -1202,7 +1202,7 @@ void LocalPlayer::preflopEngine() {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_RAISE; myAction = PLAYER_ACTION_FOLD;
// raise = 3000; // raise = 3000;
} }
break; break;
@@ -1222,7 +1222,7 @@ void LocalPlayer::preflopEngine() {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_FOLD; myAction = PLAYER_ACTION_CALL;
// raise = 20; // raise = 20;
// if(mySet >= 40) { // if(mySet >= 40) {
// myAction = PLAYER_ACTION_CALL; // myAction = PLAYER_ACTION_CALL;
@@ -1246,7 +1246,7 @@ void LocalPlayer::preflopEngine() {
case 3: { case 3: {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_FOLD; myAction = PLAYER_ACTION_CALL;
// raise = 20; // raise = 20;
// if(mySet >= 40) { // if(mySet >= 40) {
// myAction = PLAYER_ACTION_CALL; // myAction = PLAYER_ACTION_CALL;
@@ -1269,7 +1269,7 @@ void LocalPlayer::preflopEngine() {
case 4: { case 4: {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_FOLD; myAction = PLAYER_ACTION_CALL;
// raise = 20; // raise = 20;
// if(mySet > 0) { // if(mySet > 0) {
// myAction = PLAYER_ACTION_FOLD; // myAction = PLAYER_ACTION_FOLD;
@@ -1588,12 +1588,15 @@ void LocalPlayer::flopEngine() {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_BET; myAction = PLAYER_ACTION_CHECK;
// bet = 10; // bet = 10;
// raise = 20; // raise = 20;
// if(mySet >= 40) { // if(mySet >= 40) {
// myAction = PLAYER_ACTION_CALL; // myAction = PLAYER_ACTION_CALL;
// } // }
if(actualHand->getCurrentBeRo()->getHighestSet() > 0) {
myAction = PLAYER_ACTION_CALL;
}
} }
break; break;
case 2: { case 2: {
@@ -1613,7 +1616,8 @@ void LocalPlayer::flopEngine() {
case 3: { case 3: {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_CHECK; myAction = PLAYER_ACTION_BET;
bet = 80;
// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { // if(actualHand->getCurrentBeRo()->getHighestSet() > 0) {
// myAction = PLAYER_ACTION_CALL; // myAction = PLAYER_ACTION_CALL;
// } // }
@@ -1632,6 +1636,31 @@ void LocalPlayer::flopEngine() {
} }
}
break;
case 4: {
switch(actualHand->getMyID()) {
case 1: {
myAction = PLAYER_ACTION_CHECK;
// bet = 80;
if(actualHand->getCurrentBeRo()->getHighestSet() > 0) {
myAction = PLAYER_ACTION_FOLD;
}
}
break;
case 2: {
// myAction = PLAYER_ACTION_RAISE;
// raise = 50;
// if(mySet >= 70) {
// myAction = PLAYER_ACTION_CALL;
// }
}
break;
default: {
}
}
} }
break; break;
default: {} default: {}
@@ -2185,8 +2214,9 @@ void LocalPlayer::turnEngine() {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_RAISE; myAction = PLAYER_ACTION_BET;
// raise = 40; // raise = 40;
bet = 120;
// if(actualHand->getCurrentBeRo()->getHighestSet() > 100) { // if(actualHand->getCurrentBeRo()->getHighestSet() > 100) {
// myAction = PLAYER_ACTION_CALL; // myAction = PLAYER_ACTION_CALL;
// } // }
@@ -2209,7 +2239,7 @@ void LocalPlayer::turnEngine() {
case 3: { case 3: {
switch(actualHand->getMyID()) { switch(actualHand->getMyID()) {
case 1: { case 1: {
// myAction = PLAYER_ACTION_BET; myAction = PLAYER_ACTION_FOLD;
// bet = 10; // bet = 10;
// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { // if(actualHand->getCurrentBeRo()->getHighestSet() > 0) {
// myAction = PLAYER_ACTION_CALL; // myAction = PLAYER_ACTION_CALL;
+1 -1
View File
@@ -37,7 +37,7 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
myGameID(gameId), actualSmallBlind(gameData.smallBlind), actualHandID(0), dealerPosition(0), lastHandBlindsRaised(1), lastTimeBlindsRaised(0), myGameData(gameData) myGameID(gameId), actualSmallBlind(gameData.smallBlind), actualHandID(0), dealerPosition(0), lastHandBlindsRaised(1), lastTimeBlindsRaised(0), myGameData(gameData)
{ {
if(DEBUG_MODE) { if(DEBUG_MODE) {
startSmallBlind = 5120; startSmallBlind = 20;
actualSmallBlind = startSmallBlind; actualSmallBlind = startSmallBlind;
} }
+1 -1
View File
@@ -1465,7 +1465,7 @@ QString Log::determineHandName(int myCardsValueInt) {
it++; it++;
} else { } else {
different = true; different = true;
sameHandCardsValueInt.erase(it); it = sameHandCardsValueInt.erase(it);
} }
} }
if(different) { if(different) {
+2 -2
View File
@@ -805,7 +805,7 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
startData.numberOfPlayers = gameData.maxNumberOfPlayers; startData.numberOfPlayers = gameData.maxNumberOfPlayers;
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0); Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
if(DEBUG_MODE) { if(DEBUG_MODE) {
tmpDealerPos = 6; tmpDealerPos = 3;
} }
startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos); startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos);
@@ -2967,7 +2967,7 @@ void mainWindowImpl::localGameModification() {
} }
//Set the playing mode to "manual" //Set the playing mode to "manual"
playingMode = 0; playingMode = 1;
} }