Two step initialization for engine. First step: Create and initialize objects (constructor). Second step: Start the engine, update the UI.
This commit is contained in:
@@ -44,7 +44,7 @@ GuiWrapper::~GuiWrapper()
|
||||
|
||||
void GuiWrapper::initGui(int speed) { myW->initGui(speed); }
|
||||
|
||||
Session &GuiWrapper::getSession() { return myW->getSession(); }
|
||||
Session &GuiWrapper::getSession() { return myW->getSession(); }
|
||||
void GuiWrapper::setSession(boost::shared_ptr<Session> session) { myW->setSession(session); }
|
||||
|
||||
bool GuiWrapper::isNetworkServer() const { /* TODO hack */ return false; }
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
void initGui(int speed);
|
||||
|
||||
Session &getSession();
|
||||
void setSession(boost::shared_ptr<Session> session);
|
||||
void setSession(boost::shared_ptr<Session> session);
|
||||
|
||||
bool isNetworkServer() const;
|
||||
void waitForNetworkAction(GameState state, unsigned uniquePlayerId);
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#include "playerinterface.h"
|
||||
#include "boardinterface.h"
|
||||
|
||||
#include "handinterface.h"
|
||||
#include "game.h"
|
||||
#include "handinterface.h"
|
||||
#include "game.h"
|
||||
#include "session.h"
|
||||
|
||||
#include "log.h"
|
||||
@@ -2037,7 +2037,9 @@ void mainWindowImpl::showMyCards() {
|
||||
|
||||
void mainWindowImpl::startNewHand() {
|
||||
|
||||
if( !breakAfterActualHand){ mySession->getCurrentGame()->startHand();
|
||||
if( !breakAfterActualHand){
|
||||
mySession->getCurrentGame()->initHand();
|
||||
mySession->getCurrentGame()->startHand();
|
||||
}
|
||||
else {
|
||||
pushButton_break->setDisabled(FALSE);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
Reference in New Issue
Block a user