This commit is contained in:
@@ -37,7 +37,7 @@ LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, int sC, bo
|
||||
}
|
||||
|
||||
// myAggressive initialisieren
|
||||
for(i=0; i<10; i++) {
|
||||
for(i=0; i<7; i++) {
|
||||
myAggressive[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,14 +89,14 @@ public:
|
||||
|
||||
void setMyAggressive(const bool& theValue) {
|
||||
int i;
|
||||
for(i=0; i<9; i++) {
|
||||
for(i=0; i<6; i++) {
|
||||
myAggressive[i] = myAggressive[i+1];
|
||||
}
|
||||
myAggressive[9] = theValue;
|
||||
myAggressive[6] = theValue;
|
||||
}
|
||||
int getMyAggressive() const {
|
||||
int i, sum = 0;
|
||||
for(i=0; i<10; i++) {
|
||||
for(i=0; i<7; i++) {
|
||||
sum += myAggressive[i];
|
||||
}
|
||||
return sum;
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
int myRoundStartCash;
|
||||
|
||||
int myAverageSets[4];
|
||||
bool myAggressive[10];
|
||||
bool myAggressive[7];
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -144,10 +144,24 @@ void LocalRiver::postRiverRun() {
|
||||
}
|
||||
}
|
||||
|
||||
// Aggresivität des human player ermitteln
|
||||
// Durchschnittsets des human player ermitteln
|
||||
myHand->getPlayerArray()[0]->setMyAverageSets(((myHand->getPlayerArray()[0]->getMyRoundStartCash())-(myHand->getPlayerArray()[0]->getMyCash()))/(myHand->getBettingRoundsPlayed()+1));
|
||||
// cout << myHand->getPlayerArray()[0]->getMyAverageSets() << endl;
|
||||
|
||||
// Aggressivität des human player ermitteln
|
||||
// anzahl der player die möglichkeit haben am pot teilzuhaben
|
||||
int potPlayers = 0;
|
||||
for(i=0; i<myHand->getGuiInterface()->getMaxQuantityPlayers(); i++) {
|
||||
if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1) {
|
||||
potPlayers++;
|
||||
}
|
||||
}
|
||||
|
||||
// prüfen ob nur noch der human player an der verteilung teilnimmt
|
||||
myHand->getPlayerArray()[0]->setMyAggressive(potPlayers == 1 && myHand->getPlayerArray()[0]->getMyActiveStatus() && myHand->getPlayerArray()[0]->getMyAction() != 1);
|
||||
|
||||
cout << "aggressive: " << myHand->getPlayerArray()[0]->getMyAggressive() << endl;
|
||||
|
||||
// Pot-Verteilung
|
||||
distributePot();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user