mancatux/src/Session.cpp

29 lines
489 B
C++
Raw Normal View History

2007-10-15 21:32:30 +02:00
#include "Session.h"
#include "EngineFactory.h"
#include "IGame.h"
#include "Game.h"
#include "GuiWrapper.h"
Session::Session ( GuiWrapper * g)
: gui_(g)
{
newGame();
gui_->init(this);
gui_->start();
}
void Session::newGame ()
{
// todo: do this completely different
// delete game_;
Game * g = new Game( factory.createKalah(), 12);
g->player1("P1", true);
g->player2("P2", true);
game_ = g;
}
IGame * Session::game () const
{
return game_;
}