|
Cute Chess
0.1
|
A class for constructing new chess players. More...
#include <playerbuilder.h>
Public Member Functions | |
| virtual ChessPlayer * | create (QObject *receiver, const char *method, QObject *parent, QString *error) const =0 |
| virtual bool | isHuman () const =0 |
| QString | name () const |
| PlayerBuilder (const QString &name) | |
| void | setName (const QString &name) |
| virtual | ~PlayerBuilder () |
A class for constructing new chess players.
PlayerBuilder's subclasses can create all types of chess players. This class enables a GameManager object to take control of constructing, reusing and deleting players, and running multiple games concurrently, which requires multiple instances of the same players.
| PlayerBuilder::PlayerBuilder | ( | const QString & | name | ) |
Creates a new player builder with name name.
|
virtual |
Destroys the player builder.
|
pure virtual |
Creates a new player and sets its parent to parent.
| receiver | The receiver of the player's debugging messages. |
| method | The receiver's method the debugMessage(QString) signal will connect to. |
| parent | The player's parent object. |
| error | If an error occurs and error is not 0, the error description is written here. |
Implemented in HumanBuilder, and EngineBuilder.
|
pure virtual |
Returns true if the builder is for a human player; otherwise returns false.
Implemented in HumanBuilder, and EngineBuilder.
| QString PlayerBuilder::name | ( | ) | const |
Returns the player's name.
| void PlayerBuilder::setName | ( | const QString & | name | ) |
Sets the player's name to name.
1.8.11