adds activePlayerList and runningPlayerList (IV)
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
class PlayerInterface;
|
||||
class HandInterface;
|
||||
|
||||
typedef std::list<boost::shared_ptr<PlayerInterface> > PlayerList;
|
||||
typedef boost::shared_ptr<std::list<boost::shared_ptr<PlayerInterface> > > PlayerList;
|
||||
typedef std::list<boost::shared_ptr<PlayerInterface> >::iterator PlayerListIterator;
|
||||
|
||||
class BoardInterface {
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
virtual ~EngineFactory();
|
||||
|
||||
virtual HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC) =0;
|
||||
virtual HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC) =0;
|
||||
virtual BoardInterface* createBoard() =0;
|
||||
virtual boost::shared_ptr<PlayerInterface> createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB) =0;
|
||||
virtual std::vector<boost::shared_ptr<BeRoInterface> > createBeRo(HandInterface* hi, int id, int dP, int sB) =0;
|
||||
|
||||
@@ -145,8 +145,8 @@ void LocalBeRo::run() {
|
||||
|
||||
// wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende
|
||||
// ausnahme bei heads up !!! --> TODO
|
||||
if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind && myHand->getActivePlayerList().size() >= 3) { firstRound = 0; }
|
||||
if(myHand->getActivePlayerList().size() < 3 && (myHand->getPlayerArray()[playersTurn]->getMyID() == dealerPosition || myHand->getPlayerArray()[playersTurn]->getMyID() == smallBlindPosition)) { firstRound = 0; }
|
||||
if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind && myHand->getActivePlayerList()->size() >= 3) { firstRound = 0; }
|
||||
if(myHand->getActivePlayerList()->size() < 3 && (myHand->getPlayerArray()[playersTurn]->getMyID() == dealerPosition || myHand->getPlayerArray()[playersTurn]->getMyID() == smallBlindPosition)) { firstRound = 0; }
|
||||
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
|
||||
@@ -24,21 +24,30 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
LocalBeRoPreflop::LocalBeRoPreflop(HandInterface* hi, int id, int dP, int sB) : LocalBeRo(hi, id, dP, sB, GAME_STATE_PREFLOP), bigBlindPosition(0)
|
||||
LocalBeRoPreflop::LocalBeRoPreflop(HandInterface* hi, int id, int dP, int sB) : LocalBeRo(hi, id, dP, sB, GAME_STATE_PREFLOP)
|
||||
|
||||
{
|
||||
setHighestSet(2*getSmallBlind());
|
||||
|
||||
// // BigBlind ermitteln
|
||||
bigBlindPosition = getDealerPosition();
|
||||
// bigBlindPosition = getDealerPosition();
|
||||
bigBlindPosition = getMyHand()->getActivePlayerList()->begin();
|
||||
|
||||
int i;
|
||||
for(i=0; i<MAX_NUMBER_OF_PLAYERS && getMyHand()->getPlayerArray()[bigBlindPosition]->getMyButton() != BUTTON_BIG_BLIND; i++) {
|
||||
bigBlindPosition = (bigBlindPosition+1)%(MAX_NUMBER_OF_PLAYERS);
|
||||
// int i;
|
||||
// for(i=0; i<MAX_NUMBER_OF_PLAYERS && getMyHand()->getPlayerArray()[bigBlindPosition]->getMyButton() != BUTTON_BIG_BLIND; i++) {
|
||||
// bigBlindPosition = (bigBlindPosition+1)%(MAX_NUMBER_OF_PLAYERS);
|
||||
// }
|
||||
|
||||
PlayerListIterator it;
|
||||
|
||||
for(it=getMyHand()->getActivePlayerList()->begin(); it!=getMyHand()->getActivePlayerList()->end(); it++) {
|
||||
if((*it)->getMyButton() == BUTTON_BIG_BLIND) {
|
||||
bigBlindPosition = it;
|
||||
}
|
||||
}
|
||||
|
||||
// // erste Spielernummer fr preflopRun() setzen
|
||||
setPlayersTurn(bigBlindPosition);
|
||||
setPlayersTurn((*bigBlindPosition)->getMyID());
|
||||
|
||||
}
|
||||
|
||||
@@ -64,18 +73,18 @@ void LocalBeRoPreflop::run() {
|
||||
}
|
||||
|
||||
// BigBlind ermitteln
|
||||
bigBlindPosition = getDealerPosition();
|
||||
// bigBlindPosition = getDealerPosition();
|
||||
|
||||
for(i=0; i<MAX_NUMBER_OF_PLAYERS && getMyHand()->getPlayerArray()[bigBlindPosition]->getMyButton() != BUTTON_BIG_BLIND; i++) {
|
||||
bigBlindPosition = (bigBlindPosition+1)%(MAX_NUMBER_OF_PLAYERS);
|
||||
}
|
||||
// for(i=0; i<MAX_NUMBER_OF_PLAYERS && getMyHand()->getPlayerArray()[bigBlindPosition]->getMyButton() != BUTTON_BIG_BLIND; i++) {
|
||||
// bigBlindPosition = (bigBlindPosition+1)%(MAX_NUMBER_OF_PLAYERS);
|
||||
// }
|
||||
|
||||
// naechsten Spieler ermitteln
|
||||
for(i=0; (i<MAX_NUMBER_OF_PLAYERS && (!(getMyHand()->getPlayerArray()[getPlayersTurn()]->getMyActiveStatus()) || getMyHand()->getPlayerArray()[getPlayersTurn()]->getMyAction() == PLAYER_ACTION_FOLD || getMyHand()->getPlayerArray()[getPlayersTurn()]->getMyAction() == PLAYER_ACTION_ALLIN)) || i==0; i++) {
|
||||
|
||||
setPlayersTurn((getPlayersTurn()+1)%(MAX_NUMBER_OF_PLAYERS));
|
||||
// falls BigBlind, dann PreflopFirstRound zuende
|
||||
if(getMyHand()->getPlayerArray()[getPlayersTurn()]->getMyButton() == BUTTON_BIG_BLIND && getMyHand()->getPlayerArray()[bigBlindPosition]->getMySet() < 2*getSmallBlind()) setFirstRound(0);
|
||||
if(getMyHand()->getPlayerArray()[getPlayersTurn()]->getMyButton() == BUTTON_BIG_BLIND && (*bigBlindPosition)->getMySet() < 2*getSmallBlind()) setFirstRound(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ public:
|
||||
void run();
|
||||
|
||||
private:
|
||||
int bigBlindPosition;
|
||||
// int bigBlindPosition;
|
||||
PlayerListIterator bigBlindPosition;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@ LocalEngineFactory::~LocalEngineFactory()
|
||||
}
|
||||
|
||||
|
||||
HandInterface* LocalEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC) { return new LocalHand(f, g, b, sl, apl, rpl, id, sP, aP, dP, sB, sC); }
|
||||
HandInterface* LocalEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC) { return new LocalHand(f, g, b, sl, apl, rpl, id, sP, dP, sB, sC); }
|
||||
|
||||
BoardInterface* LocalEngineFactory::createBoard() { return new LocalBoard; }
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
LocalEngineFactory(ConfigFile*);
|
||||
~LocalEngineFactory();
|
||||
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC);
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC);
|
||||
BoardInterface* createBoard();
|
||||
boost::shared_ptr<PlayerInterface> createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB);
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > createBeRo(HandInterface* hi, int id, int dP, int sB);
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC)
|
||||
: myFactory(f), myGui(g), myBoard(b), playerArray(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), lastPlayersTurn(0), allInCondition(0),
|
||||
cardsShown(false), bettingRoundsPlayed(0)
|
||||
{
|
||||
|
||||
int i, j, k;
|
||||
PlayerList::iterator it;
|
||||
PlayerListIterator it;
|
||||
|
||||
CardsValue myCardsValue;
|
||||
|
||||
@@ -51,8 +51,8 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
||||
}
|
||||
|
||||
// Karten generieren und Board sowie Player zuweisen
|
||||
int *cardsArray = new int[2*activePlayerList.size()+5];
|
||||
Tools::getRandNumber(0, 51, 2*activePlayerList.size()+5, cardsArray, 1);
|
||||
int *cardsArray = new int[2*activePlayerList->size()+5];
|
||||
Tools::getRandNumber(0, 51, 2*activePlayerList->size()+5, cardsArray, 1);
|
||||
int tempBoardArray[5];
|
||||
int tempPlayerArray[2];
|
||||
int tempPlayerAndBoardArray[7];
|
||||
@@ -65,7 +65,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
||||
|
||||
k = 0;
|
||||
myBoard->setMyCards(tempBoardArray);
|
||||
for(it=activePlayerList.begin(); it!=activePlayerList.end(); it++, k++) {
|
||||
for(it=activePlayerList->begin(); it!=activePlayerList->end(); it++, k++) {
|
||||
|
||||
(*it)->getMyBestHandPosition(bestHandPos);
|
||||
|
||||
@@ -85,8 +85,8 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
||||
}
|
||||
}
|
||||
|
||||
// sBluff für alle aktiver Spieler außer human player setzen
|
||||
if(it!=activePlayerList.begin()) {
|
||||
// sBluff für alle aktiver Spieler außer human player setzen --> TODO for ai-player in internet
|
||||
if((*it)->getMyID() != 0) {
|
||||
Tools::getRandNumber(1,100,1,&sBluff,0);
|
||||
(*it)->setSBluff(sBluff);
|
||||
(*it)->setSBluffStatus(0);
|
||||
@@ -285,7 +285,7 @@ void LocalHand::start() {
|
||||
void LocalHand::assignButtons() {
|
||||
|
||||
int i,j;
|
||||
PlayerList::iterator it;
|
||||
PlayerListIterator it;
|
||||
|
||||
// alle Buttons loeschen
|
||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) { playerArray[i]->setMyButton(0); }
|
||||
@@ -300,7 +300,7 @@ void LocalHand::assignButtons() {
|
||||
|
||||
i = (i+1)%(MAX_NUMBER_OF_PLAYERS);
|
||||
if(playerArray[i]->getMyActiveStatus()) {
|
||||
if(activePlayerList.size() > 2) playerArray[i]->setMyButton(2); //small blind normal
|
||||
if(activePlayerList->size() > 2) playerArray[i]->setMyButton(2); //small blind normal
|
||||
else playerArray[i]->setMyButton(3); //big blind in heads up
|
||||
}
|
||||
}
|
||||
@@ -310,14 +310,14 @@ void LocalHand::assignButtons() {
|
||||
|
||||
i = (i+1)%(MAX_NUMBER_OF_PLAYERS);
|
||||
if(playerArray[i]->getMyActiveStatus()) {
|
||||
if(activePlayerList.size() > 2) playerArray[i]->setMyButton(3); //big blind normal
|
||||
if(activePlayerList->size() > 2) playerArray[i]->setMyButton(3); //big blind normal
|
||||
else playerArray[i]->setMyButton(2); //small blind in heads up
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//do sets
|
||||
for (it=activePlayerList.begin(); it!=activePlayerList.end(); it++) {
|
||||
for (it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
|
||||
|
||||
//small blind
|
||||
if((*it)->getMyButton() == 2) {
|
||||
@@ -329,7 +329,7 @@ void LocalHand::assignButtons() {
|
||||
// 1 to do not log this
|
||||
(*it)->setMyAction(6,1);
|
||||
// delete this player from runningPlayerList
|
||||
it = runningPlayerList.erase(it);
|
||||
it = runningPlayerList->erase(it);
|
||||
|
||||
}
|
||||
else { (*it)->setMySet(smallBlind); }
|
||||
@@ -345,7 +345,7 @@ void LocalHand::assignButtons() {
|
||||
// 1 to do not log this
|
||||
(*it)->setMyAction(6,1);
|
||||
// delete this player from runningPlayerList
|
||||
it = runningPlayerList.erase(it);
|
||||
it = runningPlayerList->erase(it);
|
||||
|
||||
}
|
||||
else { (*it)->setMySet(2*smallBlind); }
|
||||
@@ -358,17 +358,17 @@ void LocalHand::assignButtons() {
|
||||
void LocalHand::switchRounds() {
|
||||
|
||||
int i;
|
||||
PlayerList::iterator it;
|
||||
PlayerListIterator it;
|
||||
|
||||
// Anzahl der Spieler ermitteln, welche All In sind
|
||||
int allInPlayersCounter = 0;
|
||||
for (it=activePlayerList.begin(); it!=activePlayerList.end(); it++) {
|
||||
for (it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
|
||||
if ((*it)->getMyAction() == 6) allInPlayersCounter++;
|
||||
}
|
||||
|
||||
// TODO -> runningPlayerList.size()
|
||||
int nonFoldPlayerCounter = 0;
|
||||
for (it=activePlayerList.begin(); it!=activePlayerList.end(); it++) {
|
||||
for (it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
|
||||
if ((*it)->getMyAction() != 1) nonFoldPlayerCounter++;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ void LocalHand::switchRounds() {
|
||||
// HeadsUp-Ausnahme -> spieler ermitteln, der all in ist und als bb nur weniger als sb setzen konnte
|
||||
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
|
||||
if(activePlayerList.size()==2 && playerArray[i]->getMyAction() == 6 && playerArray[i]->getMyActiveStatus() == 1 && playerArray[i]->getMyButton()==3 && playerArray[i]->getMySet()<=smallBlind) {
|
||||
if(activePlayerList->size()==2 && playerArray[i]->getMyAction() == 6 && playerArray[i]->getMyActiveStatus() == 1 && playerArray[i]->getMyButton()==3 && playerArray[i]->getMySet()<=smallBlind) {
|
||||
allInCondition = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
class LocalHand : public HandInterface{
|
||||
public:
|
||||
LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> >, PlayerList, PlayerList, int, int, int, int, int, int);
|
||||
LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> >, PlayerList, PlayerList, int, int, int, int, int);
|
||||
~LocalHand();
|
||||
|
||||
void start();
|
||||
|
||||
@@ -987,7 +987,7 @@ void LocalPlayer::preflopEngine() {
|
||||
int cBluff;
|
||||
|
||||
// temporär solange preflopValue und flopValue noch nicht bereinigt für sechs und sieben spieler
|
||||
int players = actualHand->getActivePlayerList().size();
|
||||
int players = actualHand->getActivePlayerList()->size();
|
||||
if(players > 5) players = 5;
|
||||
|
||||
// myOdds auslesen
|
||||
@@ -1018,7 +1018,7 @@ void LocalPlayer::preflopEngine() {
|
||||
// cout << myID << ": " << myHoleCardsValue << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << myCards[0] << " " << myCards[1] << endl;
|
||||
|
||||
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist !
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList().size())*21.0);
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList()->size())*21.0);
|
||||
|
||||
// cout << aggValue << " ";
|
||||
|
||||
@@ -1122,7 +1122,7 @@ void LocalPlayer::preflopEngine() {
|
||||
// cout << sBluff << endl;
|
||||
|
||||
// auf sBluff testen --> raise statt call oder fold
|
||||
if((sBluff < 100/(((actualHand->getActivePlayerList().size()-2)*6)+3) && myOdds < myNiveau[2] && actualHand->getCurrentBeRo()->getHighestSet() == 2*actualHand->getSmallBlind() && sBluffStatus == 0) || sBluffStatus == 1) {
|
||||
if((sBluff < 100/(((actualHand->getActivePlayerList()->size()-2)*6)+3) && myOdds < myNiveau[2] && actualHand->getCurrentBeRo()->getHighestSet() == 2*actualHand->getSmallBlind() && sBluffStatus == 0) || sBluffStatus == 1) {
|
||||
|
||||
// cout << "sBLUFF!" << endl;
|
||||
sBluffStatus = 1;
|
||||
@@ -1143,7 +1143,7 @@ void LocalPlayer::preflopEngine() {
|
||||
// Standard-Raise-Routine
|
||||
else {
|
||||
// raise-Betrag ermitteln
|
||||
raise = (sBluff/(8-actualHand->getActivePlayerList().size()))*actualHand->getSmallBlind();
|
||||
raise = (sBluff/(8-actualHand->getActivePlayerList()->size()))*actualHand->getSmallBlind();
|
||||
// raise-Betrag zu klein -> mindestens Standard-raise
|
||||
// if(raise < actualHand->getCurrentBeRo()->getHighestSet()) {
|
||||
// raise = actualHand->getCurrentBeRo()->getHighestSet();
|
||||
@@ -1255,7 +1255,7 @@ void LocalPlayer::flopEngine() {
|
||||
int rand;
|
||||
|
||||
// übergang solange preflopValue und flopValue noch nicht bereinigt
|
||||
int players = actualHand->getActivePlayerList().size();
|
||||
int players = actualHand->getActivePlayerList()->size();
|
||||
if(players > 5) players = 5;
|
||||
|
||||
calcMyOdds();
|
||||
@@ -1273,7 +1273,7 @@ void LocalPlayer::flopEngine() {
|
||||
if(individualHighestSet > myCash) individualHighestSet = myCash;
|
||||
|
||||
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList().size())*21.0);
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList()->size())*21.0);
|
||||
|
||||
if(actualHand->getPlayerArray()[0]->getMyActiveStatus() && actualHand->getPlayerArray()[0]->getMyAction() != 1) {
|
||||
for(i=0; i<3; i++) {
|
||||
@@ -1843,7 +1843,7 @@ void LocalPlayer::turnEngine() {
|
||||
myNiveau[2] = 69 + myDude4/* - 6*(actualHand->getActivePlayerList().size() - 2)*/;
|
||||
|
||||
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList().size())*21.0);
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList()->size())*21.0);
|
||||
|
||||
if(actualHand->getPlayerArray()[0]->getMyActiveStatus() && actualHand->getPlayerArray()[0]->getMyAction() != 1) {
|
||||
for(i=0; i<3; i++) {
|
||||
@@ -2179,7 +2179,7 @@ void LocalPlayer::riverEngine() {
|
||||
myNiveau[2] = 69 + myDude4/* - 6*(actualHand->getActivePlayerList().size() - 2)*/;
|
||||
|
||||
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList().size())*21.0);
|
||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActivePlayerList()->size())*21.0);
|
||||
|
||||
if(actualHand->getPlayerArray()[0]->getMyActiveStatus() && actualHand->getPlayerArray()[0]->getMyAction() != 1) {
|
||||
for(i=0; i<3; i++) {
|
||||
@@ -3226,7 +3226,7 @@ void LocalPlayer::calcMyOdds() {
|
||||
handCode = preflopCardsValue(myCards);
|
||||
|
||||
// übergang solange preflopValue und flopValue noch nicht bereinigt
|
||||
int players = actualHand->getActivePlayerList().size();
|
||||
int players = actualHand->getActivePlayerList()->size();
|
||||
if(players > 5) players = 5;
|
||||
// paranoia
|
||||
if(players < 2) players = 2;
|
||||
@@ -3259,7 +3259,7 @@ void LocalPlayer::calcMyOdds() {
|
||||
// cout << "\t" << handCode << endl;
|
||||
|
||||
// übergang solange preflopValue und flopValue noch nicht bereinigt
|
||||
int players = actualHand->getActivePlayerList().size();
|
||||
int players = actualHand->getActivePlayerList()->size();
|
||||
if(players > 5) players = 5;
|
||||
// paranoia
|
||||
if(players < 2) players = 2;
|
||||
|
||||
@@ -35,9 +35,9 @@ ClientEngineFactory::~ClientEngineFactory()
|
||||
}
|
||||
|
||||
|
||||
HandInterface* ClientEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
HandInterface* ClientEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC)
|
||||
{
|
||||
return new ClientHand(f, g, b, sl, apl, rpl, id, sP, aP, dP, sB, sC);
|
||||
return new ClientHand(f, g, b, sl, apl, rpl, id, sP, dP, sB, sC);
|
||||
}
|
||||
|
||||
BoardInterface* ClientEngineFactory::createBoard()
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
ClientEngineFactory();
|
||||
~ClientEngineFactory();
|
||||
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC);
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC);
|
||||
BoardInterface* createBoard();
|
||||
boost::shared_ptr<PlayerInterface> createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB);
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > createBeRo(HandInterface* hi, int id, int dP, int sB);
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC)
|
||||
: myFactory(f), myGui(g), myBoard(b), playerArray(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0),
|
||||
smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
||||
smallBlind(sB), startCash(sC), lastPlayersTurn(0), allInCondition(0),
|
||||
cardsShown(false), bettingRoundsPlayed(0)
|
||||
{
|
||||
activePlayersCounter = activePlayerList->size();
|
||||
|
||||
int i;
|
||||
lastPlayersTurn = 0;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
class ClientHand : public HandInterface
|
||||
{
|
||||
public:
|
||||
ClientHand ( boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> >, PlayerList, PlayerList , int, int, int, int, int, int );
|
||||
ClientHand ( boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> >, PlayerList, PlayerList , int, int, int, int, int );
|
||||
~ClientHand();
|
||||
|
||||
void start();
|
||||
|
||||
Reference in New Issue
Block a user