GameFactory Class Reference
#include <gamefactory.h>
List of all members.
Detailed Description
This gives us access to all of our games.
- Author:
- John Schneiderman
Constructor & Destructor Documentation
GameFactory::GameFactory |
( |
|
) |
|
GameFactory::~GameFactory |
( |
|
) |
|
Member Function Documentation
void GameFactory::clear |
( |
|
) |
|
Clears all of our currently running games.
bool GameFactory::createGame |
( |
UserProfileDatabase & |
profileDatabase, |
|
|
const QString & |
game, |
|
|
QStackedWidget & |
layout | |
|
) |
| | |
Creates a card game.
- Parameters:
-
| profileDatabase | is the user profile database. |
| game | is the name of the game we want to create. |
- Note:
- Game names must all be in lowercase.
- Parameters:
-
| layout | is the layout to add the game to. |
- Returns:
- true if the game was created, false if it was failed to be created.
Accessor to our currently running game.
- Returns:
- our current running game.
- Exceptions:
-
| KardsGTError | if you try to access the game before a game has been created. |
const GameBase & GameFactory::game |
( |
|
) |
const |
Accessor to all of our currently running games.
- Returns:
- our current running game.
- Exceptions:
-
| KardsGTError | if you try to access the game before a game has been created. |
bool GameFactory::hasGame |
( |
|
) |
const |
This tells us if we have a game running.
- Returns:
- true if we have a game, false if we do not.
bool GameFactory::setupGame |
( |
UserProfileDatabase & |
profileDatabase, |
|
|
const QString & |
game, |
|
|
QStackedWidget & |
layout | |
|
) |
| | [protected] |
This setups up a game ready to be played and adds it to our game listing.
- Parameters:
-
| profileDatabase | is the user profile database. |
| game | is the game we want to setup. |
| layout | is the layout to add the game to. |
- Returns:
- true if the game is successfully setup, false if something goes wrong.
The documentation for this class was generated from the following files:
- gamefactory.h
- gamefactory.cpp