Start position of dealer is now set via network. Added files for network client engine. Added factory code.

This commit is contained in:
lotodore
2007-05-18 17:13:27 +00:00
parent a9e2d56b0d
commit b773c30ae0
38 changed files with 1302 additions and 55 deletions
+25 -2
View File
@@ -21,6 +21,8 @@
#include "game.h"
#include "guiinterface.h"
#include "configfile.h"
#include <localenginefactory.h>
#include <clientenginefactory.h>
#include <net/clientthread.h>
#include <net/serverthread.h>
@@ -46,7 +48,7 @@ Session::~Session()
}
void Session::startGame(const GameData &gameData) {
void Session::startLocalGame(const GameData &gameData) {
deleteGame();
myGui->initGui(gameData.guiSpeed);
@@ -73,7 +75,28 @@ void Session::startGame(const GameData &gameData) {
playerDataList.push_back(playerData);
}
currentGame = new Game(myGui, playerDataList, gameData, currentGameID, myConfig);
// EngineFactory erstellen
boost::shared_ptr<EngineFactory> factory(new LocalEngineFactory(myConfig)); // LocalEngine erstellen
currentGame = new Game(myGui, factory, playerDataList, gameData, currentGameID);
//// SPIEL-SCHLEIFE
currentGame->initHand();
currentGame->startHand();
// SPIEL-SCHLEIFE
}
void Session::startClientGame(const GameData &gameData, const PlayerDataList &playerDataList)
{
deleteGame();
myGui->initGui(gameData.guiSpeed);
currentGameID++;
// EngineFactory erstellen
boost::shared_ptr<EngineFactory> factory(new ClientEngineFactory(myConfig)); // LocalEngine erstellen
currentGame = new Game(myGui, factory, playerDataList, gameData, currentGameID);
//// SPIEL-SCHLEIFE
currentGame->initHand();