UCILoader 1.1.2
Small C++ library that allows user to connect to a chess engines via UCI protocol.
Loading...
Searching...
No Matches
StandardChess::StartPos Class Reference

Position formatter for the standard chess starting position. More...

#include <StandardChess.h>

Inheritance diagram for StandardChess::StartPos:
UCILoader::PositionFormatter

Public Member Functions

std::string toFen () const override
 Get the FEN string for the starting position.
 
std::string toPositionString () const override
 Get the UCI position string for the starting position.
 
virtual std::string toFen () const =0
 
virtual std::string toPositionString () const =0
 

Detailed Description

Position formatter for the standard chess starting position.

Implements PositionFormatter to represent the initial chess position (FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1).

Useful as the root position for engine searches.

Usage:

auto search = engine->search(params, StartPos(), moves);
Position formatter for the standard chess starting position.
Definition: StandardChess.h:250
See also
FenPos for custom positions
PositionFormatter for the interface

Member Function Documentation

◆ toFen()

std::string StandardChess::StartPos::toFen ( ) const
inlineoverridevirtual

Get the FEN string for the starting position.

Returns
FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

Implements UCILoader::PositionFormatter.

◆ toPositionString()

std::string StandardChess::StartPos::toPositionString ( ) const
inlineoverridevirtual

Get the UCI position string for the starting position.

Returns
The string "startpos"

Implements UCILoader::PositionFormatter.


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