|
Cute Chess
0.1
|
A chess engine which uses the UCI chess interface. More...
#include <uciengine.h>
Public Member Functions | |
| virtual void | clearPonderState () |
| virtual void | endGame (const Chess::Result &result) |
| virtual void | makeBookMove (const Chess::Move &move) |
| virtual void | makeMove (const Chess::Move &move) |
| virtual QString | protocol () const |
| virtual void | startPondering () |
| UciEngine (QObject *parent=nullptr) | |
Public Member Functions inherited from ChessEngine | |
| void | applyConfiguration (const EngineConfiguration &configuration) |
| ChessEngine (QObject *parent=nullptr) | |
| QIODevice * | device () const |
| virtual bool | isHuman () const |
| virtual bool | isReady () const |
| QList< EngineOption * > | options () const |
| void | ping (bool sendCommand=true) |
| void | setDevice (QIODevice *device) |
| void | setOption (const QString &name, const QVariant &value) |
| void | start () |
| virtual bool | supportsVariant (const QString &variant) const |
| QStringList | variants () const |
| void | write (const QString &data, WriteMode mode=Buffered) |
Public Member Functions inherited from ChessPlayer | |
| bool | areClaimsValidated () const |
| ChessPlayer (QObject *parent=nullptr) | |
| QString | errorString () const |
| const MoveEvaluation & | evaluation () const |
| bool | hasError () const |
| QString | name () const |
| void | newGame (Chess::Side side, ChessPlayer *opponent, Chess::Board *board) |
| void | setCanPlayAfterTimeout (bool enable) |
| void | setClaimsValidated (bool validate) |
| void | setName (const QString &name) |
| void | setTimeControl (const TimeControl &timeControl) |
| Chess::Side | side () const |
| State | state () const |
| const TimeControl * | timeControl () const |
Protected Member Functions | |
| virtual bool | isPondering () const |
| virtual void | parseLine (const QString &line) |
| virtual void | sendOption (const QString &name, const QVariant &value) |
| virtual bool | sendPing () |
| virtual void | sendQuit () |
| virtual void | sendStop () |
| virtual void | startGame () |
| virtual void | startProtocol () |
| virtual void | startThinking () |
Protected Member Functions inherited from ChessEngine | |
| void | addOption (EngineOption *option) |
| void | addVariant (const QString &variant) |
| void | clearVariants () |
| EngineOption * | getOption (const QString &name) const |
| bool | pondering () const |
| EngineConfiguration::RestartMode | restartMode () const |
| virtual bool | restartsBetweenGames () const |
| bool | stopThinking () |
| bool | whiteEvalPov () const |
Protected Member Functions inherited from ChessPlayer | |
| Chess::Board * | board () |
| virtual bool | canPlayAfterTimeout () const |
| void | claimResult (const Chess::Result &result) |
| void | emitMove (const Chess::Move &move) |
| void | forfeit (Chess::Result::Type type, const QString &description=QString()) |
| const ChessPlayer * | opponent () const |
| void | setError (const QString &error) |
| void | setState (State state) |
Additional Inherited Members | |
Public Types inherited from ChessEngine | |
| enum | WriteMode { Buffered, Unbuffered } |
Public Types inherited from ChessPlayer | |
| enum | State { NotStarted, Starting, Idle, Observing, Thinking, FinishingGame, Disconnected } |
Public Slots inherited from ChessEngine | |
| virtual void | go () |
| virtual void | kill () |
| virtual void | quit () |
Public Slots inherited from ChessPlayer | |
| virtual void | go () |
| virtual void | kill () |
| virtual void | quit () |
Signals inherited from ChessPlayer | |
| void | debugMessage (const QString &data) |
| void | disconnected () |
| void | moveMade (const Chess::Move &move) |
| void | nameChanged (const QString &name) |
| void | ready () |
| void | resultClaim (const Chess::Result &result) |
| void | startedThinking (int timeLeft) |
| void | stoppedThinking () |
| void | thinking (const MoveEvaluation &eval) |
Protected Slots inherited from ChessEngine | |
| void | clearWriteBuffer () |
| void | flushWriteBuffer () |
| void | onIdleTimeout () |
| void | onPingTimeout () |
| void | onProtocolStart () |
| void | onReadyRead () |
| virtual void | onTimeout () |
| void | pong (bool emitReady=true) |
Protected Slots inherited from ChessPlayer | |
| virtual void | onCrashed () |
| virtual void | onTimeout () |
Static Protected Member Functions inherited from ChessEngine | |
| static QStringRef | firstToken (const QString &str, bool readToEnd=false) |
| static QStringRef | nextToken (const QStringRef &previous, bool readToEnd=false) |
Protected Attributes inherited from ChessPlayer | |
| MoveEvaluation | m_eval |
A chess engine which uses the UCI chess interface.
UCI's specifications: http://wbec-ridderkerk.nl/html/UCIProtocol.html
|
virtual |
Clears the player's pondering state.
Reimplemented from ChessPlayer.
|
virtual |
Tells the player that the game ended by result.
Reimplemented from ChessEngine.
|
protectedvirtual |
Returns true if the engine is currently thinking on the opponent's move; otherwise returns false.
Reimplemented from ChessEngine.
|
virtual |
Forces the player to play move as its next move.
Reimplemented from ChessPlayer.
|
virtual |
Sends the next move of an ongoing game to the player. If the player is in force/observer mode, the move wasn't necessarily made by the opponent.
Implements ChessPlayer.
|
protectedvirtual |
Parses a line of input from the engine.
Implements ChessEngine.
|
virtual |
Returns the engine's chess protocol.
Implements ChessEngine.
Tells the engine to set option name's value to value.
Implements ChessEngine.
|
protectedvirtual |
Sends a ping command to the engine. Returns true if successful; otherwise returns false.
Implements ChessEngine.
|
protectedvirtual |
Sends the quit command to the engine.
Implements ChessEngine.
|
protectedvirtual |
Sends the stop command to the engine.
Implements ChessEngine.
|
protectedvirtual |
Starts the chess game set up by newGame().
Implements ChessEngine.
|
virtual |
Tells the player to start pondering (thinking on the opponent's move). The default implementation does nothing.
Reimplemented from ChessPlayer.
|
protectedvirtual |
Puts the engine in the correct mode to start communicating with it, using the chosen chess protocol.
Implements ChessEngine.
|
protectedvirtual |
Tells the player to start thinking of the next move.
The player is guaranteed to be ready to move when this function is called by go().
Implements ChessPlayer.
1.8.11