new distributePot function

This commit is contained in:
doitux
2007-08-10 20:45:23 +00:00
parent 5f168635a9
commit 4f005bb0c1
4 changed files with 68 additions and 69 deletions
@@ -65,7 +65,6 @@ void LocalBeRoPostRiver::run() {
// Pot-Verteilung // Pot-Verteilung
getMyHand()->getBoard()->distributePot(); getMyHand()->getBoard()->distributePot();
// distributePot();
//Pot auf 0 setzen //Pot auf 0 setzen
getMyHand()->getBoard()->setPot(0); getMyHand()->getBoard()->setPot(0);
+64 -64
View File
@@ -100,70 +100,70 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // // !!!!!!!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //
int temp5Array[5]; // // int temp5Array[5];
// //
tempBoardArray[0] = 8; // // tempBoardArray[0] = 8;
tempBoardArray[1] = 9; // // tempBoardArray[1] = 9;
tempBoardArray[2] = 10; // // tempBoardArray[2] = 10;
tempBoardArray[3] = 11; // // tempBoardArray[3] = 11;
tempBoardArray[4] = 13; // // tempBoardArray[4] = 13;
// //
myBoard->setMyCards(tempBoardArray); // // myBoard->setMyCards(tempBoardArray);
// //
tempPlayerAndBoardArray[2] = tempBoardArray[0]; // // tempPlayerAndBoardArray[2] = tempBoardArray[0];
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];
// //
tempPlayerArray[0] = 13; // // tempPlayerArray[0] = 13;
tempPlayerArray[1] = 25; // // tempPlayerArray[1] = 25;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; // // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; // // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
// //
playerArray[0]->setMyCards(tempPlayerArray); // // playerArray[0]->setMyCards(tempPlayerArray);
playerArray[0]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); // // playerArray[0]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
// //
playerArray[0]->setMyBestHandPosition(temp5Array); // // playerArray[0]->setMyBestHandPosition(temp5Array);
// //
// for(i=0; i<5; i++) { // // // for(i=0; i<5; i++) {
// cout << temp5Array[i] << " "; // // // cout << temp5Array[i] << " ";
// } // // // }
// cout << endl; // // // cout << endl;
// //
tempPlayerArray[0] = 23; // // tempPlayerArray[0] = 31;
tempPlayerArray[1] = 15; // // tempPlayerArray[1] = 18;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; // // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; // // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
// //
playerArray[1]->setMyCards(tempPlayerArray); // // playerArray[1]->setMyCards(tempPlayerArray);
playerArray[1]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); // // playerArray[1]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
// //
playerArray[1]->setMyBestHandPosition(temp5Array); // // playerArray[1]->setMyBestHandPosition(temp5Array);
// //
tempPlayerArray[0] = 20; // // tempPlayerArray[0] = 20;
tempPlayerArray[1] = 38; // // tempPlayerArray[1] = 38;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; // // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; // // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
// //
playerArray[2]->setMyCards(tempPlayerArray); // // playerArray[2]->setMyCards(tempPlayerArray);
playerArray[2]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); // // playerArray[2]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
// //
playerArray[2]->setMyBestHandPosition(temp5Array); // // playerArray[2]->setMyBestHandPosition(temp5Array);
// //
tempPlayerArray[0] = 19; // // tempPlayerArray[0] = 19;
tempPlayerArray[1] = 21; // // tempPlayerArray[1] = 51;
tempPlayerAndBoardArray[0] = tempPlayerArray[0]; // // tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1]; // // tempPlayerAndBoardArray[1] = tempPlayerArray[1];
// //
playerArray[3]->setMyCards(tempPlayerArray); // // playerArray[3]->setMyCards(tempPlayerArray);
playerArray[3]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); // // playerArray[3]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
// //
playerArray[3]->setMyBestHandPosition(temp5Array); // // playerArray[3]->setMyBestHandPosition(temp5Array);
// //
// for(i=0; i<4; i++) { // // // for(i=0; i<4; i++) {
// cout << i << ": " << playerArray[i]->getMyCardsValueInt() << endl; // // // cout << i << ": " << playerArray[i]->getMyCardsValueInt() << endl;
// } // // // }
// ---------------------------------------- // ----------------------------------------
+3 -3
View File
@@ -40,9 +40,9 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq
// if(myID==1) { // if(myID==1) {
// myCash=6130; // myCash=6130;
// } // }
if(myID==2) { // if(myID==2) {
myCash=37; // myCash=37;
} // }
//////////////////////////// ////////////////////////////
// myBestHandPosition mit -1 initialisieren // myBestHandPosition mit -1 initialisieren
+1 -1
View File
@@ -56,7 +56,7 @@
using namespace std; using namespace std;
mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent) mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
: QMainWindow(parent), myConfig(c), gameSpeed(0), myActionIsBet(0), myActionIsRaise(0), debugMode(1), breakAfterActualHand(FALSE) : QMainWindow(parent), myConfig(c), gameSpeed(0), myActionIsBet(0), myActionIsRaise(0), debugMode(0), breakAfterActualHand(FALSE)
{ {
int i; int i;