Public Member Functions

GameLauncher Class Reference

Thread for the game. More...

#include <GameLauncher.hpp>

List of all members.

Public Member Functions

 GameLauncher (AbstractGame *pGame)
void run ()
Q_SIGNAL void gameDraw ()
Q_SIGNAL void gameVictory (int color)

Detailed Description

Thread for the game.

The game is independant of the user interface (only attached together by the listener / notifier). Since we don't want to have an interface stucked by the game or opposite, the game is started using an indepent thread.

Warning:
it seems that can be a bit tricky, since the notify() code is runned by this thread, even if the UI is done in another thread. To avoid this UI can launch signals to notify the UI thread of the changement

Member Function Documentation

Q_SIGNAL void GameLauncher::gameDraw (  ) 

signal when the game finished with a draw

Q_SIGNAL void GameLauncher::gameVictory ( int  color  ) 

signal when the game finished with a victory of color

Parameters:
color the winning player
void GameLauncher::run (  ) 

Threaded function


The documentation for this class was generated from the following files:
 All Classes Functions Variables