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:
lotodore
2007-05-12 22:00:59 +00:00
parent 7c6337d810
commit 6fbef0af20
15 changed files with 79 additions and 74 deletions
+1 -1
View File
@@ -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; }
+1 -1
View File
@@ -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);
+5 -3
View File
@@ -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);
+1 -1
View File
@@ -26,7 +26,7 @@
#include <iostream>
#include <string>
#include <boost/shared_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <QtGui>
#include <QtCore>