This commit is contained in:
@@ -39,8 +39,8 @@ public:
|
||||
virtual void setPot(int theValue) =0;
|
||||
virtual int getSets() const=0;
|
||||
//
|
||||
virtual void collectSets() const=0;
|
||||
virtual void collectPot() const=0;
|
||||
virtual void collectSets() =0;
|
||||
virtual void collectPot() =0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -28,20 +28,13 @@
|
||||
#include "turninterface.h"
|
||||
#include "riverinterface.h"
|
||||
|
||||
// class HandInterface;
|
||||
// class BoardInterface;
|
||||
// class PlayerInterface;
|
||||
// class PreflopInterface;
|
||||
// class FlopInterface;
|
||||
// class TurnInterface;
|
||||
// class RiverInterface;
|
||||
|
||||
class EngineFactory{
|
||||
public:
|
||||
|
||||
virtual ~EngineFactory();
|
||||
|
||||
virtual HandInterface* createHand(GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC) =0;
|
||||
virtual HandInterface* createHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC) =0;
|
||||
virtual BoardInterface* createBoard() =0;
|
||||
virtual PlayerInterface* createPlayer(BoardInterface *b, int id, int sC, bool aS, int mB) =0;
|
||||
virtual PreflopInterface* createPreflop(HandInterface* hi, int id, int qP, int dP, int sB) =0;
|
||||
|
||||
@@ -62,10 +62,10 @@ public:
|
||||
virtual void setStartCash(const int& theValue) =0;
|
||||
virtual int getStartCash() const =0;
|
||||
|
||||
virtual void assignButtons();
|
||||
virtual void assignButtons() =0;
|
||||
|
||||
virtual void highlightRoundLabel();
|
||||
virtual void switchRounds();
|
||||
virtual void highlightRoundLabel() =0;
|
||||
virtual void switchRounds() =0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
void setPot(int theValue) { pot = theValue;}
|
||||
int getSets() const { return sets; }
|
||||
|
||||
void collectSets();
|
||||
void collectPot();
|
||||
void collectSets() ;
|
||||
void collectPot() ;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
***************************************************************************/
|
||||
#include "localenginefactory.h"
|
||||
|
||||
#include "localhand.h"
|
||||
#include "localboard.h"
|
||||
#include "localplayer.h"
|
||||
#include "localpreflop.h"
|
||||
#include "localflop.h"
|
||||
#include "localturn.h"
|
||||
#include "localriver.h"
|
||||
|
||||
LocalEngineFactory::LocalEngineFactory()
|
||||
: EngineFactory()
|
||||
@@ -38,7 +31,7 @@ LocalEngineFactory::~LocalEngineFactory()
|
||||
}
|
||||
|
||||
|
||||
HandInterface* LocalEngineFactory::createHand(GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC) { return new LocalHand(g, b, p, id, qP, dP, sB, sC); }
|
||||
HandInterface* LocalEngineFactory::createHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC) { return new LocalHand(f, g, b, p, id, qP, dP, sB, sC); }
|
||||
|
||||
BoardInterface* LocalEngineFactory::createBoard() { return new LocalBoard; }
|
||||
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
|
||||
#include <enginefactory.h>
|
||||
|
||||
#include "localhand.h"
|
||||
#include "localboard.h"
|
||||
#include "localplayer.h"
|
||||
#include "localpreflop.h"
|
||||
#include "localflop.h"
|
||||
#include "localturn.h"
|
||||
#include "localriver.h"
|
||||
|
||||
class LocalEngineFactory : public EngineFactory
|
||||
{
|
||||
@@ -30,7 +37,7 @@ public:
|
||||
|
||||
~LocalEngineFactory();
|
||||
|
||||
HandInterface* createHand(GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC);
|
||||
HandInterface* createHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC);
|
||||
BoardInterface* createBoard();
|
||||
PlayerInterface* createPlayer(BoardInterface *b, int id, int sC, bool aS, int mB);
|
||||
PreflopInterface* createPreflop(HandInterface* hi, int id, int qP, int dP, int sB);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
LocalHand::LocalHand(GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC) : HandInterface(), myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), allInCondition(0)
|
||||
LocalHand::LocalHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int qP, int dP, int sB,int sC) : HandInterface(), myFactory(f), myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), allInCondition(0)
|
||||
{
|
||||
int i, j;
|
||||
CardsValue myCardsValue;
|
||||
@@ -29,7 +29,6 @@ LocalHand::LocalHand(GuiInterface *g, BoardInterface *b, PlayerInterface **p, in
|
||||
myGui->setHand(this);
|
||||
myBoard->setHand(this);
|
||||
|
||||
// myEngine->setHand(this);
|
||||
|
||||
for(i=0; i<actualQuantityPlayers; i++) playerArray[i]->setHand(this);
|
||||
|
||||
@@ -72,10 +71,10 @@ LocalHand::LocalHand(GuiInterface *g, BoardInterface *b, PlayerInterface **p, in
|
||||
|
||||
|
||||
// Preflop, Flop, Turn und River erstellen
|
||||
myPreflop = new LocalPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||
myFlop = new LocalFlop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||
myTurn = new LocalTurn(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||
myRiver = new LocalRiver(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||
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);
|
||||
|
||||
//Rundenwechsel | beim ersten Durchlauf --> Preflop starten
|
||||
myGui->nextPlayerAnimation();
|
||||
|
||||
@@ -20,9 +20,11 @@
|
||||
#ifndef HandInterface_H
|
||||
#define HandInterface_H
|
||||
|
||||
#include "guiinterface.h"
|
||||
#include "enginefactory.h"
|
||||
|
||||
#include "handinterface.h"
|
||||
#include "guiinterface.h"
|
||||
|
||||
|
||||
#include "tools.h"
|
||||
#include "cardsvalue.h"
|
||||
@@ -32,20 +34,10 @@
|
||||
#include "localriver.h"
|
||||
|
||||
|
||||
// class GuiInterface;
|
||||
class BoardInterface;
|
||||
class PlayerInterface;
|
||||
// class HandInterface;
|
||||
|
||||
class LocalPreflop;
|
||||
class LocalFlop;
|
||||
class LocalTurn;
|
||||
class LocalRiver;
|
||||
|
||||
|
||||
class LocalHand : public HandInterface{
|
||||
public:
|
||||
LocalHand(GuiInterface*, BoardInterface*, PlayerInterface**, int, int, int, int, int);
|
||||
LocalHand(EngineFactory*, GuiInterface*, BoardInterface*, PlayerInterface**, int, int, int, int, int);
|
||||
|
||||
~LocalHand();
|
||||
|
||||
@@ -53,10 +45,10 @@ public:
|
||||
|
||||
PlayerInterface** getPlayerArray() const { return playerArray; }
|
||||
BoardInterface* getBoard() const { return myBoard; }
|
||||
LocalPreflop* getPreflop() const { return myPreflop; }
|
||||
LocalFlop* getFlop() const { return myFlop; }
|
||||
LocalTurn* getTurn() const { return myTurn; }
|
||||
LocalRiver* getRiver() const { return myRiver; }
|
||||
PreflopInterface* getPreflop() const { return myPreflop; }
|
||||
FlopInterface* getFlop() const { return myFlop; }
|
||||
TurnInterface* getTurn() const { return myTurn; }
|
||||
RiverInterface* getRiver() const { return myRiver; }
|
||||
GuiInterface* getGuiInterface() const { return myGui; }
|
||||
|
||||
void setMyID(const int& theValue) { myID = theValue; }
|
||||
@@ -92,13 +84,14 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
EngineFactory *myFactory;
|
||||
GuiInterface *myGui;
|
||||
BoardInterface *myBoard;
|
||||
PlayerInterface **playerArray;
|
||||
LocalPreflop *myPreflop;
|
||||
LocalFlop *myFlop;
|
||||
LocalTurn *myTurn;
|
||||
LocalRiver *myRiver;
|
||||
PreflopInterface *myPreflop;
|
||||
FlopInterface *myFlop;
|
||||
TurnInterface *myTurn;
|
||||
RiverInterface *myRiver;
|
||||
|
||||
int myID;
|
||||
int actualQuantityPlayers;
|
||||
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
void setHighestSet(const int& theValue) { highestSet = theValue; }
|
||||
int getHighestSet() const { return highestSet;}
|
||||
|
||||
void setLocalPreflopFirstRound(bool theValue) { preflopFirstRound = theValue; }
|
||||
bool setLocalPreflopFirstRound() const { return preflopFirstRound; }
|
||||
void setPreflopFirstRound(bool theValue) { preflopFirstRound = theValue; }
|
||||
bool setPreflopFirstRound() const { return preflopFirstRound; }
|
||||
|
||||
void preflopRun();
|
||||
void nextPlayer2();
|
||||
|
||||
@@ -31,8 +31,8 @@ public:
|
||||
virtual void setHighestSet(const int& theValue) =0;
|
||||
virtual int getHighestSet() const =0;
|
||||
|
||||
virtual void setLocalPreflopFirstRound(bool theValue) =0;
|
||||
virtual bool setLocalPreflopFirstRound() const =0;
|
||||
virtual void setPreflopFirstRound(bool theValue) =0;
|
||||
virtual bool setPreflopFirstRound() const =0;
|
||||
|
||||
virtual void preflopRun() =0;
|
||||
virtual void nextPlayer2() =0;
|
||||
|
||||
Reference in New Issue
Block a user