std::vector<boost::shared_ptr<BeRoInterface> > implemented
This commit is contained in:
@@ -16,6 +16,10 @@
|
|||||||
@author FThauer FHammer <webmaster@pokerth.net>
|
@author FThauer FHammer <webmaster@pokerth.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <berointerface.h>
|
#include <berointerface.h>
|
||||||
|
|
||||||
class BeRoFactoryInterface{
|
class BeRoFactoryInterface{
|
||||||
@@ -27,6 +31,8 @@ public:
|
|||||||
|
|
||||||
virtual BeRoInterface* createBeRoPreflop() =0;
|
virtual BeRoInterface* createBeRoPreflop() =0;
|
||||||
|
|
||||||
|
virtual std::vector<boost::shared_ptr<BeRoInterface> > createBeRo() =0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ public:
|
|||||||
virtual void resetFirstRun() =0;
|
virtual void resetFirstRun() =0;
|
||||||
virtual int getHighestCardsValue() const =0;
|
virtual int getHighestCardsValue() const =0;
|
||||||
|
|
||||||
|
virtual void run() =0;
|
||||||
|
|
||||||
virtual void preflopRun() =0;
|
virtual void preflopRun() =0;
|
||||||
virtual void flopRun() =0;
|
virtual void flopRun() =0;
|
||||||
virtual void turnRun() =0;
|
virtual void turnRun() =0;
|
||||||
|
|||||||
@@ -20,6 +20,10 @@
|
|||||||
#ifndef HANDINTERFACE_H
|
#ifndef HANDINTERFACE_H
|
||||||
#define HANDINTERFACE_H
|
#define HANDINTERFACE_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include "guiinterface.h"
|
#include "guiinterface.h"
|
||||||
#include "boardinterface.h"
|
#include "boardinterface.h"
|
||||||
#include "playerinterface.h"
|
#include "playerinterface.h"
|
||||||
@@ -38,12 +42,12 @@ public:
|
|||||||
|
|
||||||
virtual PlayerInterface** getPlayerArray() const =0;
|
virtual PlayerInterface** getPlayerArray() const =0;
|
||||||
virtual BoardInterface* getBoard() const =0;
|
virtual BoardInterface* getBoard() const =0;
|
||||||
virtual BeRoInterface* getPreflop() const =0;
|
virtual boost::shared_ptr<BeRoInterface> getPreflop() const =0;
|
||||||
virtual BeRoInterface* getFlop() const =0;
|
virtual boost::shared_ptr<BeRoInterface> getFlop() const =0;
|
||||||
virtual BeRoInterface* getTurn() const =0;
|
virtual boost::shared_ptr<BeRoInterface> getTurn() const =0;
|
||||||
virtual BeRoInterface* getRiver() const =0;
|
virtual boost::shared_ptr<BeRoInterface> getRiver() const =0;
|
||||||
virtual GuiInterface* getGuiInterface() const =0;
|
virtual GuiInterface* getGuiInterface() const =0;
|
||||||
virtual BeRoInterface* getCurrentBeRo() const =0;
|
virtual boost::shared_ptr<BeRoInterface> getCurrentBeRo() const =0;
|
||||||
|
|
||||||
virtual void setMyID(int theValue) =0;
|
virtual void setMyID(int theValue) =0;
|
||||||
virtual int getMyID() const =0;
|
virtual int getMyID() const =0;
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ public:
|
|||||||
int getHighestCardsValue() const {}
|
int getHighestCardsValue() const {}
|
||||||
void setHighestCardsValue(int theValue) {}
|
void setHighestCardsValue(int theValue) {}
|
||||||
|
|
||||||
//only until bero refactory is over
|
void run() {}
|
||||||
|
//only until bero refactoring is over
|
||||||
void preflopRun() {}
|
void preflopRun() {}
|
||||||
void flopRun() {}
|
void flopRun() {}
|
||||||
void riverRun() {}
|
void riverRun() {}
|
||||||
|
|||||||
@@ -21,6 +21,24 @@ LocalBeRoFactory::LocalBeRoFactory (HandInterface* hi, int id, int aP, int dP, i
|
|||||||
LocalBeRoFactory::~LocalBeRoFactory()
|
LocalBeRoFactory::~LocalBeRoFactory()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > LocalBeRoFactory::createBeRo() {
|
||||||
|
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
|
||||||
|
|
||||||
|
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoPreflop(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||||
|
|
||||||
|
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoFlop(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||||
|
|
||||||
|
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoTurn(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||||
|
|
||||||
|
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoRiver(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||||
|
|
||||||
|
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoPostRiver(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||||
|
|
||||||
|
return myBeRo;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
BeRoInterface* LocalBeRoFactory::createBeRoPreflop() {
|
BeRoInterface* LocalBeRoFactory::createBeRoPreflop() {
|
||||||
|
|
||||||
BeRoInterface* preflopBeRo = new LocalBeRoPreflop ( myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind );
|
BeRoInterface* preflopBeRo = new LocalBeRoPreflop ( myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind );
|
||||||
|
|||||||
@@ -14,6 +14,10 @@
|
|||||||
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <berofactoryinterface.h>
|
#include <berofactoryinterface.h>
|
||||||
#include <berointerface.h>
|
#include <berointerface.h>
|
||||||
#include <handinterface.h>
|
#include <handinterface.h>
|
||||||
@@ -37,6 +41,9 @@ public:
|
|||||||
|
|
||||||
BeRoInterface* createBeRoPreflop();
|
BeRoInterface* createBeRoPreflop();
|
||||||
|
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > createBeRo();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
HandInterface* myHand;
|
HandInterface* myHand;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ LocalBeRoFlop::~LocalBeRoFlop()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalBeRoFlop::flopRun() {
|
void LocalBeRoFlop::run() {
|
||||||
|
|
||||||
cout << "LocalBeroFlopRun!!!" << endl;
|
cout << "LocalBeroFlopRun!!!" << endl;
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ public:
|
|||||||
|
|
||||||
void resetFirstRun() { firstFlopRun = false; }
|
void resetFirstRun() { firstFlopRun = false; }
|
||||||
|
|
||||||
void flopRun();
|
void run();
|
||||||
|
|
||||||
void nextPlayer2();
|
void nextPlayer2();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ LocalBeRoPreflop::~LocalBeRoPreflop()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalBeRoPreflop::preflopRun() {
|
void LocalBeRoPreflop::run() {
|
||||||
|
|
||||||
cout << "LocalBeroPreflopRun!!!" << endl;
|
cout << "LocalBeroPreflopRun!!!" << endl;
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public:
|
|||||||
void setHighestSet(int theValue) { highestSet = theValue; }
|
void setHighestSet(int theValue) { highestSet = theValue; }
|
||||||
int getHighestSet() const { return highestSet;}
|
int getHighestSet() const { return highestSet;}
|
||||||
|
|
||||||
void preflopRun();
|
void run();
|
||||||
void nextPlayer2();
|
void nextPlayer2();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ LocalBeRoRiver::~LocalBeRoRiver()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LocalBeRoRiver::riverRun() {
|
void LocalBeRoRiver::run() {
|
||||||
|
|
||||||
cout << "LocalBeroRiverRun!!!" << endl;
|
cout << "LocalBeroRiverRun!!!" << endl;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
void resetFirstRun() { firstRiverRun = false; }
|
void resetFirstRun() { firstRiverRun = false; }
|
||||||
|
|
||||||
void riverRun();
|
void run();
|
||||||
void postRiverRun();
|
void postRiverRun();
|
||||||
void nextPlayer2();
|
void nextPlayer2();
|
||||||
void distributePot();
|
void distributePot();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ LocalBeRoTurn::~LocalBeRoTurn()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LocalBeRoTurn::turnRun() {
|
void LocalBeRoTurn::run() {
|
||||||
|
|
||||||
cout << "LocalBeroTurnRun!!!" << endl;
|
cout << "LocalBeroTurnRun!!!" << endl;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
void resetFirstRun() { firstTurnRun = false; }
|
void resetFirstRun() { firstTurnRun = false; }
|
||||||
|
|
||||||
void nextPlayer2();
|
void nextPlayer2();
|
||||||
void turnRun();
|
void run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,11 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int sP, int aP, int dP, int sB,int sC)
|
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int sP, int aP, int dP, int sB,int sC)
|
||||||
: myFactory(f), myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0),
|
: myFactory(f), myBeRo(0), myGui(g), myBoard(b), playerArray(p), myID(id), actualQuantityPlayers(aP), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
||||||
myID(id), actualQuantityPlayers(aP), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0),
|
|
||||||
smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
|
||||||
cardsShown(false), bettingRoundsPlayed(0)
|
cardsShown(false), bettingRoundsPlayed(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
CardsValue myCardsValue;
|
CardsValue myCardsValue;
|
||||||
@@ -166,33 +165,17 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
|||||||
// Dealer, SB, BB bestimmen
|
// Dealer, SB, BB bestimmen
|
||||||
assignButtons();
|
assignButtons();
|
||||||
|
|
||||||
// Preflop, Flop, Turn und River erstellen
|
|
||||||
// myPreflop = myFactory->createPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
|
||||||
// myFlop = myFactory->createFlop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
|
||||||
// myTurn = myFactory->createTurn(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
|
||||||
// myRiver = myFactory->createRiver(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
|
||||||
|
|
||||||
myBeRoFactory = myFactory->createBeRoFactory(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
myBeRoFactory = myFactory->createBeRoFactory(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||||
|
|
||||||
int currentRound = actualRound; // for Lothar ;-)
|
int currentRound = actualRound; // for Lothar ;-)
|
||||||
|
|
||||||
myBeRo = myBeRoFactory->createBeRoPreflop();
|
myBeRo = myBeRoFactory->createBeRo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LocalHand::~LocalHand()
|
LocalHand::~LocalHand()
|
||||||
{
|
{
|
||||||
|
|
||||||
delete myPreflop;
|
|
||||||
myPreflop = 0;
|
|
||||||
delete myFlop;
|
|
||||||
myFlop = 0;
|
|
||||||
delete myTurn;
|
|
||||||
myTurn = 0;
|
|
||||||
delete myRiver;
|
|
||||||
myRiver = 0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalHand::start() {
|
void LocalHand::start() {
|
||||||
@@ -327,17 +310,7 @@ void LocalHand::switchRounds() {
|
|||||||
// Spieler ermitteln, der noch nicht All In ist
|
// Spieler ermitteln, der noch nicht All In ist
|
||||||
if(playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyAction() != 6 && playerArray[i]->getMyActiveStatus() == 1) {
|
if(playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyAction() != 6 && playerArray[i]->getMyActiveStatus() == 1) {
|
||||||
tempHighestSet = 0;
|
tempHighestSet = 0;
|
||||||
switch (actualRound) {
|
tempHighestSet = myBeRo[actualRound]->getHighestSet();
|
||||||
case 0: {tempHighestSet = myBeRo->getHighestSet();}
|
|
||||||
break;
|
|
||||||
case 1: {tempHighestSet = myBeRo->getHighestSet();}
|
|
||||||
break;
|
|
||||||
case 2: {tempHighestSet = myBeRo->getHighestSet();}
|
|
||||||
break;
|
|
||||||
case 3: {tempHighestSet = myBeRo->getHighestSet();}
|
|
||||||
break;
|
|
||||||
default: {}
|
|
||||||
}
|
|
||||||
// cout << "tempHighestSet: " << tempHighestSet << "playerArray[i]->getMySet(): " << playerArray[i]->getMySet() << endl;
|
// cout << "tempHighestSet: " << tempHighestSet << "playerArray[i]->getMySet(): " << playerArray[i]->getMySet() << endl;
|
||||||
|
|
||||||
if(playerArray[i]->getMySet() >= tempHighestSet) {
|
if(playerArray[i]->getMySet() >= tempHighestSet) {
|
||||||
@@ -384,8 +357,6 @@ void LocalHand::switchRounds() {
|
|||||||
|
|
||||||
int currentRound = actualRound;
|
int currentRound = actualRound;
|
||||||
|
|
||||||
myBeRo = myBeRoFactory->switchRounds(myBeRo, currentRound);
|
|
||||||
|
|
||||||
// cout << "NextPlayerSpeed2 start" << endl;
|
// cout << "NextPlayerSpeed2 start" << endl;
|
||||||
switch(actualRound) {
|
switch(actualRound) {
|
||||||
case 0: {
|
case 0: {
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
#ifndef LOCALHAND_H
|
#ifndef LOCALHAND_H
|
||||||
#define LOCALHAND_H
|
#define LOCALHAND_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <enginefactory.h>
|
#include <enginefactory.h>
|
||||||
#include <guiinterface.h>
|
#include <guiinterface.h>
|
||||||
#include <boardinterface.h>
|
#include <boardinterface.h>
|
||||||
#include <playerinterface.h>
|
#include <playerinterface.h>
|
||||||
#include <handinterface.h>
|
#include <handinterface.h>
|
||||||
#include <preflopinterface.h>
|
|
||||||
#include <flopinterface.h>
|
|
||||||
#include <turninterface.h>
|
|
||||||
#include <riverinterface.h>
|
|
||||||
#include <berointerface.h>
|
#include <berointerface.h>
|
||||||
#include <berofactoryinterface.h>
|
#include <berofactoryinterface.h>
|
||||||
|
|
||||||
@@ -42,12 +42,12 @@ public:
|
|||||||
|
|
||||||
PlayerInterface** getPlayerArray() const { return playerArray; }
|
PlayerInterface** getPlayerArray() const { return playerArray; }
|
||||||
BoardInterface* getBoard() const { return myBoard; }
|
BoardInterface* getBoard() const { return myBoard; }
|
||||||
BeRoInterface* getPreflop() const { return myBeRo; }
|
boost::shared_ptr<BeRoInterface> getPreflop() const { return myBeRo[actualRound]; }
|
||||||
BeRoInterface* getFlop() const { return myBeRo; }
|
boost::shared_ptr<BeRoInterface> getFlop() const { return myBeRo[actualRound]; }
|
||||||
BeRoInterface* getTurn() const { return myBeRo; }
|
boost::shared_ptr<BeRoInterface> getTurn() const { return myBeRo[actualRound]; }
|
||||||
BeRoInterface* getRiver() const { return myBeRo; }
|
boost::shared_ptr<BeRoInterface> getRiver() const { return myBeRo[actualRound]; }
|
||||||
GuiInterface* getGuiInterface() const { return myGui; }
|
GuiInterface* getGuiInterface() const { return myGui; }
|
||||||
BeRoInterface* getCurrentBeRo() const { return myBeRo; }
|
boost::shared_ptr<BeRoInterface> getCurrentBeRo() const { return myBeRo[actualRound]; }
|
||||||
|
|
||||||
void setMyID(int theValue) { myID = theValue; }
|
void setMyID(int theValue) { myID = theValue; }
|
||||||
int getMyID() const { return myID; }
|
int getMyID() const { return myID; }
|
||||||
@@ -96,12 +96,8 @@ private:
|
|||||||
GuiInterface *myGui;
|
GuiInterface *myGui;
|
||||||
BoardInterface *myBoard;
|
BoardInterface *myBoard;
|
||||||
PlayerInterface **playerArray;
|
PlayerInterface **playerArray;
|
||||||
PreflopInterface *myPreflop;
|
|
||||||
FlopInterface *myFlop;
|
|
||||||
TurnInterface *myTurn;
|
|
||||||
RiverInterface *myRiver;
|
|
||||||
BeRoInterface *myBeRo;
|
|
||||||
BeRoFactoryInterface *myBeRoFactory;
|
BeRoFactoryInterface *myBeRoFactory;
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
|
||||||
|
|
||||||
int myID;
|
int myID;
|
||||||
int actualQuantityPlayers;
|
int actualQuantityPlayers;
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
#ifndef CLIENTBERO_H
|
#ifndef CLIENTBERO_H
|
||||||
#define CLIENTBERO_H
|
#define CLIENTBERO_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include "berointerface.h"
|
#include "berointerface.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -26,6 +30,8 @@ public:
|
|||||||
|
|
||||||
int getMyBeRoID() const { return myBeRoID; }
|
int getMyBeRoID() const { return myBeRoID; }
|
||||||
|
|
||||||
|
void run() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
int myBeRoID;
|
int myBeRoID;
|
||||||
|
|||||||
@@ -22,6 +22,19 @@ ClientBeRoFactory::~ClientBeRoFactory()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > ClientBeRoFactory::createBeRo()
|
||||||
|
{
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > bettingRounds;
|
||||||
|
// bettingRounds.push_back(boost::shared_ptr<BeRoInterface>(new
|
||||||
|
// LocalBeRoPreflop(...)));
|
||||||
|
// bettingRounds.push_back(boost::shared_ptr<BeRoInterface>(new
|
||||||
|
// LocalBeRoFlop(...)));
|
||||||
|
//
|
||||||
|
// ...
|
||||||
|
return bettingRounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BeRoInterface* ClientBeRoFactory::switchRounds(BeRoInterface* currentBeRo, int currentRound) { return NULL;}
|
BeRoInterface* ClientBeRoFactory::switchRounds(BeRoInterface* currentBeRo, int currentRound) { return NULL;}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
#ifndef CLIENTBEROFACTORY_H
|
#ifndef CLIENTBEROFACTORY_H
|
||||||
#define CLIENTBEROFACTORY_H
|
#define CLIENTBEROFACTORY_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <berofactoryinterface.h>
|
#include <berofactoryinterface.h>
|
||||||
#include <handinterface.h>
|
#include <handinterface.h>
|
||||||
|
|
||||||
@@ -29,6 +33,8 @@ public:
|
|||||||
|
|
||||||
BeRoInterface* createBeRoPreflop();
|
BeRoInterface* createBeRoPreflop();
|
||||||
|
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > createBeRo();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -84,34 +84,34 @@ ClientHand::getBoard() const
|
|||||||
return myBoard;
|
return myBoard;
|
||||||
}
|
}
|
||||||
|
|
||||||
BeRoInterface*
|
boost::shared_ptr<BeRoInterface>
|
||||||
ClientHand::getPreflop() const
|
ClientHand::getPreflop() const
|
||||||
{
|
{
|
||||||
return myBeRo;
|
return myBeRo[actualRound];
|
||||||
}
|
}
|
||||||
|
|
||||||
BeRoInterface*
|
boost::shared_ptr<BeRoInterface>
|
||||||
ClientHand::getFlop() const
|
ClientHand::getFlop() const
|
||||||
{
|
{
|
||||||
return myBeRo;
|
return myBeRo[actualRound];
|
||||||
}
|
}
|
||||||
|
|
||||||
BeRoInterface*
|
boost::shared_ptr<BeRoInterface>
|
||||||
ClientHand::getTurn() const
|
ClientHand::getTurn() const
|
||||||
{
|
{
|
||||||
return myBeRo;
|
return myBeRo[actualRound];
|
||||||
}
|
}
|
||||||
|
|
||||||
BeRoInterface*
|
boost::shared_ptr<BeRoInterface>
|
||||||
ClientHand::getRiver() const
|
ClientHand::getRiver() const
|
||||||
{
|
{
|
||||||
return myBeRo;
|
return myBeRo[actualRound];
|
||||||
}
|
}
|
||||||
|
|
||||||
BeRoInterface*
|
boost::shared_ptr<BeRoInterface>
|
||||||
ClientHand::getCurrentBeRo() const
|
ClientHand::getCurrentBeRo() const
|
||||||
{
|
{
|
||||||
return myBeRo;
|
return myBeRo[actualRound];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class ClientHand : public HandInterface
|
class ClientHand : public HandInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -42,12 +44,12 @@ public:
|
|||||||
|
|
||||||
PlayerInterface** getPlayerArray() const;
|
PlayerInterface** getPlayerArray() const;
|
||||||
BoardInterface* getBoard() const;
|
BoardInterface* getBoard() const;
|
||||||
BeRoInterface* getPreflop() const;
|
boost::shared_ptr<BeRoInterface> getPreflop() const;
|
||||||
BeRoInterface* getFlop() const;
|
boost::shared_ptr<BeRoInterface> getFlop() const;
|
||||||
BeRoInterface* getTurn() const;
|
boost::shared_ptr<BeRoInterface> getTurn() const;
|
||||||
BeRoInterface* getRiver() const;
|
boost::shared_ptr<BeRoInterface> getRiver() const;
|
||||||
GuiInterface* getGuiInterface() const;
|
GuiInterface* getGuiInterface() const;
|
||||||
BeRoInterface* getCurrentBeRo() const;
|
boost::shared_ptr<BeRoInterface> getCurrentBeRo() const;
|
||||||
|
|
||||||
void setMyID ( int theValue );
|
void setMyID ( int theValue );
|
||||||
int getMyID() const;
|
int getMyID() const;
|
||||||
@@ -99,7 +101,8 @@ private:
|
|||||||
FlopInterface *myFlop;
|
FlopInterface *myFlop;
|
||||||
TurnInterface *myTurn;
|
TurnInterface *myTurn;
|
||||||
RiverInterface *myRiver;
|
RiverInterface *myRiver;
|
||||||
BeRoInterface *myBeRo;
|
BeRoInterface *myOldBeRo;
|
||||||
|
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
|
||||||
|
|
||||||
int myID;
|
int myID;
|
||||||
int actualQuantityPlayers;
|
int actualQuantityPlayers;
|
||||||
|
|||||||
@@ -1814,26 +1814,26 @@ void mainWindowImpl::nextPlayerAnimation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::preflopAnimation1() { preflopAnimation1Timer->start(nextPlayerSpeed2); }
|
void mainWindowImpl::preflopAnimation1() { preflopAnimation1Timer->start(nextPlayerSpeed2); }
|
||||||
void mainWindowImpl::preflopAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getPreflop()->preflopRun(); }
|
void mainWindowImpl::preflopAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getPreflop()->run(); }
|
||||||
|
|
||||||
void mainWindowImpl::preflopAnimation2() { preflopAnimation2Timer->start(preflopNextPlayerSpeed); }
|
void mainWindowImpl::preflopAnimation2() { preflopAnimation2Timer->start(preflopNextPlayerSpeed); }
|
||||||
void mainWindowImpl::preflopAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getPreflop()->nextPlayer2(); }
|
void mainWindowImpl::preflopAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getPreflop()->nextPlayer2(); }
|
||||||
|
|
||||||
|
|
||||||
void mainWindowImpl::flopAnimation1() { flopAnimation1Timer->start(nextPlayerSpeed2); }
|
void mainWindowImpl::flopAnimation1() { flopAnimation1Timer->start(nextPlayerSpeed2); }
|
||||||
void mainWindowImpl::flopAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getFlop()->flopRun(); }
|
void mainWindowImpl::flopAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getFlop()->run(); }
|
||||||
|
|
||||||
void mainWindowImpl::flopAnimation2() { flopAnimation2Timer->start(nextPlayerSpeed3); }
|
void mainWindowImpl::flopAnimation2() { flopAnimation2Timer->start(nextPlayerSpeed3); }
|
||||||
void mainWindowImpl::flopAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getFlop()->nextPlayer2(); }
|
void mainWindowImpl::flopAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getFlop()->nextPlayer2(); }
|
||||||
|
|
||||||
void mainWindowImpl::turnAnimation1() { turnAnimation1Timer->start(nextPlayerSpeed2); }
|
void mainWindowImpl::turnAnimation1() { turnAnimation1Timer->start(nextPlayerSpeed2); }
|
||||||
void mainWindowImpl::turnAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getTurn()->turnRun(); }
|
void mainWindowImpl::turnAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getTurn()->run(); }
|
||||||
|
|
||||||
void mainWindowImpl::turnAnimation2() { turnAnimation2Timer->start(nextPlayerSpeed3); }
|
void mainWindowImpl::turnAnimation2() { turnAnimation2Timer->start(nextPlayerSpeed3); }
|
||||||
void mainWindowImpl::turnAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getTurn()->nextPlayer2(); }
|
void mainWindowImpl::turnAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getTurn()->nextPlayer2(); }
|
||||||
|
|
||||||
void mainWindowImpl::riverAnimation1() { riverAnimation1Timer->start(nextPlayerSpeed2); }
|
void mainWindowImpl::riverAnimation1() { riverAnimation1Timer->start(nextPlayerSpeed2); }
|
||||||
void mainWindowImpl::riverAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getRiver()->riverRun(); }
|
void mainWindowImpl::riverAnimation1Action() { mySession->getCurrentGame()->getCurrentHand()->getRiver()->run(); }
|
||||||
|
|
||||||
void mainWindowImpl::riverAnimation2() { riverAnimation2Timer->start(nextPlayerSpeed3); }
|
void mainWindowImpl::riverAnimation2() { riverAnimation2Timer->start(nextPlayerSpeed3); }
|
||||||
void mainWindowImpl::riverAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getRiver()->nextPlayer2(); }
|
void mainWindowImpl::riverAnimation2Action() { mySession->getCurrentGame()->getCurrentHand()->getRiver()->nextPlayer2(); }
|
||||||
@@ -1944,7 +1944,6 @@ void mainWindowImpl::postRiverRunAnimation3() {
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||||
cout << currentHand->getRiver()->getMyBeRoID() << endl;
|
|
||||||
//Alle Winner erhellen und "Winner" schreiben
|
//Alle Winner erhellen und "Winner" schreiben
|
||||||
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
if(currentHand->getPlayerArray()[i]->getMyActiveStatus() && currentHand->getPlayerArray()[i]->getMyAction() != 1 && currentHand->getPlayerArray()[i]->getMyCardsValueInt() == currentHand->getRiver()->getHighestCardsValue() ) {
|
if(currentHand->getPlayerArray()[i]->getMyActiveStatus() && currentHand->getPlayerArray()[i]->getMyAction() != 1 && currentHand->getPlayerArray()[i]->getMyCardsValueInt() == currentHand->getRiver()->getHighestCardsValue() ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user