#include <abstractengine.h>
Inheritance diagram for AbstractEngine:

Public Types | |
| enum | GameStatus { Running, Stopped } |
| Stati of the game. More... | |
Public Slots | |
| virtual void | playerInput (int inputId, int playerNumber, int cardNumber)=0 |
| Player input available. | |
Signals | |
| void | signalGameOver (int winner) |
| The game over signal. | |
| void | signalNextPlayer (Player *player) |
| A players turn is about to start. | |
Public Member Functions | |
| AbstractEngine (QWidget *parent) | |
| Constructor for the game engine. | |
| virtual void | startGame (Suite trump, int startPlayer)=0 |
| Start a new game. | |
| virtual void | stopGame ()=0 |
| Stop a game. | |
| virtual bool | isGameRunning () |
| Is the game still running? | |
| virtual void | addPlayer (int no, Player *player) |
| Add a player to the game. | |
| virtual Player * | player (int no) |
| Retreive the player of the given number. | |
| virtual int | currentPlayer () |
| Retrieve the current player id. | |
Protected Attributes | |
| GameStatus | mGameStatus |
| Current game status. | |
| int | mCurrentPlayer |
| Whose turn is it. | |
| QHash< int, Player * > | mPlayers |
| Player in the game. | |
Definition at line 41 of file abstractengine.h.
|
|
Stati of the game.
Definition at line 52 of file abstractengine.h. |
|
|
Constructor for the game engine.
Definition at line 31 of file abstractengine.cpp. References mGameStatus, mPlayers, and Stopped. |
|
||||||||||||
|
Add a player to the game.
Definition at line 40 of file abstractengine.cpp. References mPlayers, and player(). Referenced by Mainwindow::menuNewLSkatGame(). Here is the call graph for this function: ![]() |
|
|
Retrieve the current player id.
Definition at line 84 of file abstractengine.h. References mCurrentPlayer. Referenced by AiInput::aiTurn(). |
|
|
Is the game still running?
Definition at line 67 of file abstractengine.h. References mGameStatus, and Running. Referenced by EngineTwo::gameLoopFinish(), EngineTwo::gameLoopStart(), and Mainwindow::setInputType(). |
|
|
Retreive the player of the given number.
Definition at line 47 of file abstractengine.cpp. References mPlayers. Referenced by addPlayer(), EngineTwo::gameLoopFinish(), AiInput::getBoardFromEngine(), EngineTwo::isLegalMove(), EngineTwo::playerInput(), and EngineTwo::startGame(). |
|
||||||||||||||||
|
Player input available.
Implemented in EngineTwo. |
|
|
The game over signal.
Referenced by EngineTwo::gameLoopFinish(). |
|
|
A players turn is about to start.
|
|
||||||||||||
|
Start a new game.
Implemented in EngineTwo. |
|
|
Stop a game.
Implemented in EngineTwo. Referenced by Mainwindow::menuEndGame(), Mainwindow::menuNewLSkatGame(), and Mainwindow::queryExit(). |
|
|
Whose turn is it.
Definition at line 110 of file abstractengine.h. Referenced by currentPlayer(), EngineTwo::EngineTwo(), EngineTwo::gameLoopFinish(), EngineTwo::gameLoopStart(), EngineTwo::playerInput(), and EngineTwo::startGame(). |
|
|
Current game status.
Definition at line 108 of file abstractengine.h. Referenced by AbstractEngine(), EngineTwo::gameLoopFinish(), isGameRunning(), and EngineTwo::startGame(). |
|
|
Player in the game.
Definition at line 113 of file abstractengine.h. Referenced by AbstractEngine(), EngineTwo::activatePlayer(), addPlayer(), EngineTwo::evaluateGame(), EngineTwo::gameLoopFinish(), player(), EngineTwo::playerInput(), EngineTwo::startGame(), and EngineTwo::stopGame(). |
1.4.6