Changes in preparation for the integration of the network server. GUI does not directly know Game and Hand any more, only Session. WARNING: This version crashes due to initialization order problems.
This commit is contained in:
@@ -110,17 +110,25 @@ void LocalFlop::flopRun() {
|
||||
// cout << "playersTurn " << playersTurn << endl;
|
||||
// wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende
|
||||
if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstFlopRound = 0; }
|
||||
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
// cout << "actualRound " << myHand->getActualRound() << endl;
|
||||
// cout << "highestSet vor meInAction " << highestSet << endl;
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
|
||||
if(myHand->getGuiInterface()->isNetworkServer())
|
||||
{
|
||||
myHand->getGuiInterface()->waitForNetworkAction(
|
||||
GAME_STATE_FLOP, myHand->getPlayerArray()[playersTurn]->getMyUniqueID());
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
// cout << "NextPlayerSpeed3 start" << endl;
|
||||
myHand->getGuiInterface()->flopAnimation2();
|
||||
else
|
||||
{
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
// cout << "actualRound " << myHand->getActualRound() << endl;
|
||||
// cout << "highestSet vor meInAction " << highestSet << endl;
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
// cout << "NextPlayerSpeed3 start" << endl;
|
||||
myHand->getGuiInterface()->flopAnimation2();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ LocalHand::LocalHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, Playe
|
||||
|
||||
CardsValue myCardsValue;
|
||||
|
||||
myGui->setHand(this);
|
||||
myBoard->setHand(this);
|
||||
|
||||
|
||||
|
||||
@@ -107,14 +107,22 @@ void LocalPreflop::preflopRun() {
|
||||
myHand->getPlayerArray()[playersTurn]->setMyTurn(1);
|
||||
myHand->getGuiInterface()->refreshGroupbox(playersTurn,2);
|
||||
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
if(myHand->getGuiInterface()->isNetworkServer())
|
||||
{
|
||||
myHand->getGuiInterface()->waitForNetworkAction(
|
||||
GAME_STATE_PREFLOP, myHand->getPlayerArray()[playersTurn]->getMyUniqueID());
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
// cout << "NextPlayerSpeed3 start" << endl;
|
||||
myHand->getGuiInterface()->preflopAnimation2();
|
||||
else
|
||||
{
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
// cout << "NextPlayerSpeed3 start" << endl;
|
||||
myHand->getGuiInterface()->preflopAnimation2();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,16 +110,24 @@ void LocalRiver::riverRun() {
|
||||
// cout << "playersTurn " << playersTurn << endl;
|
||||
// wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende
|
||||
if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstRiverRound = 0; }
|
||||
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
// cout << "actualRound " << myHand->getActualRound() << endl;
|
||||
// cout << "highestSet vor meInAction " << highestSet << endl;
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
|
||||
if(myHand->getGuiInterface()->isNetworkServer())
|
||||
{
|
||||
myHand->getGuiInterface()->waitForNetworkAction(
|
||||
GAME_STATE_RIVER, myHand->getPlayerArray()[playersTurn]->getMyUniqueID());
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
myHand->getGuiInterface()->riverAnimation2();
|
||||
else
|
||||
{
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
// cout << "actualRound " << myHand->getActualRound() << endl;
|
||||
// cout << "highestSet vor meInAction " << highestSet << endl;
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
myHand->getGuiInterface()->riverAnimation2();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,17 +111,25 @@ void LocalTurn::turnRun() {
|
||||
// cout << "playersTurn " << playersTurn << endl;
|
||||
// wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende
|
||||
if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstTurnRound = 0; }
|
||||
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
// cout << "actualRound " << myHand->getActualRound() << endl;
|
||||
// cout << "highestSet vor meInAction " << highestSet << endl;
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
|
||||
if(myHand->getGuiInterface()->isNetworkServer())
|
||||
{
|
||||
myHand->getGuiInterface()->waitForNetworkAction(
|
||||
GAME_STATE_TURN, myHand->getPlayerArray()[playersTurn]->getMyUniqueID());
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
// cout << "NextPlayerSpeed3 start" << endl;
|
||||
myHand->getGuiInterface()->turnAnimation2();
|
||||
else
|
||||
{
|
||||
if(playersTurn == 0) {
|
||||
// Wir sind dran
|
||||
// cout << "actualRound " << myHand->getActualRound() << endl;
|
||||
// cout << "highestSet vor meInAction " << highestSet << endl;
|
||||
myHand->getGuiInterface()->meInAction();
|
||||
}
|
||||
else {
|
||||
//Gegner sind dran
|
||||
// cout << "NextPlayerSpeed3 start" << endl;
|
||||
myHand->getGuiInterface()->turnAnimation2();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user