Cute Chess  0.1
Public Member Functions | List of all members
HumanBuilder Class Reference

A class for constructing human players. More...

#include <humanbuilder.h>

Inheritance diagram for HumanBuilder:
PlayerBuilder

Public Member Functions

virtual ChessPlayercreate (QObject *receiver, const char *method, QObject *parent, QString *error) const
 
 HumanBuilder (const QString &playerName=QString(), bool playAfterTimeout=true)
 
virtual bool isHuman () const
 
- Public Member Functions inherited from PlayerBuilder
QString name () const
 
 PlayerBuilder (const QString &name)
 
void setName (const QString &name)
 
virtual ~PlayerBuilder ()
 

Detailed Description

A class for constructing human players.

Constructor & Destructor Documentation

HumanBuilder::HumanBuilder ( const QString playerName = QString(),
bool  playAfterTimeout = true 
)

Creates a new HumanBuilder.

Any created players will have the name playerName, unless it's an empty string. They cannot forfeit on time if playAfterTimeout is true.

Member Function Documentation

ChessPlayer * HumanBuilder::create ( QObject receiver,
const char *  method,
QObject parent,
QString error 
) const
virtual

Creates a new player and sets its parent to parent.

Parameters
receiverThe receiver of the player's debugging messages.
methodThe receiver's method the debugMessage(QString) signal will connect to.
parentThe player's parent object.
errorIf an error occurs and error is not 0, the error description is written here.

Implements PlayerBuilder.

bool HumanBuilder::isHuman ( ) const
virtual

Returns true if the builder is for a human player; otherwise returns false.

Implements PlayerBuilder.


The documentation for this class was generated from the following files: