|
Cute Chess 0.1
|
A board for Horde Chess and Dunsany's Chess (Defaults are set to lichess.org (SF) variant) More...
#include <hordeboard.h>
Public Member Functions | |
| virtual Board * | copy () const |
| virtual QString | defaultFenString () const |
| HordeBoard () | |
| virtual Result | result () |
| virtual QString | variant () const |
Public Member Functions inherited from Chess::StandardBoard | |
| virtual Board * | copy () const |
| virtual QString | defaultFenString () const |
| StandardBoard () | |
| virtual Result | tablebaseResult (unsigned int *dtm=nullptr) const |
| virtual QString | variant () const |
Public Member Functions inherited from Chess::WesternBoard | |
| virtual int | height () const |
| virtual Result | result () |
| virtual int | reversibleMoveCount () const |
| WesternBoard (WesternZobrist *zobrist) | |
| virtual int | width () const |
Public Member Functions inherited from Chess::Board | |
| Board (Zobrist *zobrist) | |
| virtual CoordinateSystem | coordinateSystem () const |
| virtual Board * | copy () const =0 |
| virtual QString | defaultFenString () const =0 |
| QString | fenString (FenNotation notation=XFen) const |
| GenericMove | genericMove (const Move &move) const |
| virtual int | height () const =0 |
| void | initialize () |
| bool | isLegalMove (const Move &move) |
| virtual bool | isRandomVariant () const |
| bool | isRepetition (const Move &move) |
| bool | isValidSquare (const Square &square) const |
| quint64 | key () const |
| QVector< Move > | legalMoves () |
| void | makeMove (const Move &move, BoardTransition *transition=nullptr) |
| Move | moveFromGenericMove (const GenericMove &move) const |
| Move | moveFromString (const QString &str) |
| QString | moveString (const Move &move, MoveNotation notation) |
| Piece | pieceAt (const Square &square) const |
| Piece | pieceFromSymbol (const QString &pieceSymbol) const |
| QStringList | pieceList (Side side) const |
| QString | pieceString (int pieceType) const |
| QString | pieceSymbol (Piece piece) const |
| int | plyCount () const |
| int | repeatCount () const |
| QString | representation (Piece piece) const |
| int | reserveCount (Piece piece) const |
| virtual QList< Piece > | reservePieceTypes () const |
| void | reset () |
| virtual Result | result ()=0 |
| virtual int | reversibleMoveCount () const |
| bool | setFenString (const QString &fen) |
| Side | sideToMove () const |
| QString | startingFenString () const |
| Side | startingSide () const |
| virtual Result | tablebaseResult (unsigned int *dtm=nullptr) const |
| void | undoMove () |
| virtual Side | upperCaseSide () const |
| virtual QString | variant () const =0 |
| virtual bool | variantHasDrops () const |
| virtual bool | variantHasWallSquares () const |
| virtual int | width () const =0 |
| virtual | ~Board () |
Protected Member Functions | |
| virtual bool | kingsCountAssertion (int whiteKings, int blackKings) const |
| virtual bool | vIsLegalMove (const Move &m) |
Protected Member Functions inherited from Chess::WesternBoard | |
| virtual void | addPromotions (int sourceSquare, int targetSquare, QVarLengthArray< Move > &moves) const |
| virtual int | captureType (const Move &move) const |
| virtual int | castlingFile (CastlingSide castlingSide) const |
| int | enpassantSquare () const |
| virtual void | generateMovesForPiece (QVarLengthArray< Move > &moves, int pieceType, int square) const |
| virtual bool | hasCastling () const |
| bool | hasCastlingRight (Side side, CastlingSide castlingSide) const |
| virtual bool | hasEnPassantCaptures () const |
| virtual bool | inCheck (Side side, int square=0) const |
| virtual bool | isLegalPosition () |
| virtual bool | kingCanCapture () const |
| virtual bool | kingsCountAssertion (int whiteKings, int blackKings) const |
| int | kingSquare (Side side) const |
| virtual QString | lanMoveString (const Move &move) |
| virtual Move | moveFromLanString (const QString &str) |
| virtual Move | moveFromSanString (const QString &str) |
| virtual bool | parseCastlingRights (QChar c) |
| int | pawnAmbiguity (StepType type=FreeStep) const |
| virtual bool | pawnHasDoubleStep () const |
| void | removeCastlingRights (int square) |
| void | removeCastlingRights (Side side) |
| virtual QString | sanMoveString (const Move &move) |
| virtual bool | variantHasChanneling (Side side, int square) const |
| virtual QString | vFenIncludeString (FenNotation notation) const |
| virtual QString | vFenString (FenNotation notation) const |
| virtual void | vInitialize () |
| virtual bool | vIsLegalMove (const Move &move) |
| virtual void | vMakeMove (const Move &move, BoardTransition *transition) |
| virtual bool | vSetFenString (const QStringList &fen) |
| virtual void | vUndoMove (const Move &move) |
Protected Member Functions inherited from Chess::Board | |
| void | addToReserve (const Piece &piece, int count=1) |
| int | arraySize () const |
| bool | canMove () |
| virtual int | captureType (const Move &move) const |
| Square | chessSquare (const QString &str) const |
| Square | chessSquare (int index) const |
| void | generateDropMoves (QVarLengthArray< Move > &moves, int pieceType) const |
| void | generateHoppingMoves (int sourceSquare, const QVarLengthArray< int > &offsets, QVarLengthArray< Move > &moves) const |
| void | generateMoves (QVarLengthArray< Move > &moves, int pieceType=Piece::NoPiece) const |
| virtual void | generateMovesForPiece (QVarLengthArray< Move > &moves, int pieceType, int square) const =0 |
| void | generateSlidingMoves (int sourceSquare, const QVarLengthArray< int > &offsets, QVarLengthArray< Move > &moves) const |
| virtual bool | isLegalPosition ()=0 |
| virtual QString | lanMoveString (const Move &move) |
| const Move & | lastMove () const |
| virtual int | maxPieceSymbolLength () const |
| bool | moveExists (const Move &move) const |
| virtual Move | moveFromLanString (const QString &str) |
| virtual Move | moveFromSanString (const QString &str)=0 |
| Piece | pieceAt (int square) const |
| bool | pieceHasMovement (int pieceType, unsigned movement) const |
| void | removeFromReserve (const Piece &piece) |
| virtual int | reserveType (int pieceType) const |
| virtual QString | sanMoveString (const Move &move)=0 |
| void | setPieceType (int type, const QString &name, const QString &symbol, unsigned movement=0, const QString &gsymbol=QString()) |
| void | setSquare (int square, Piece piece) |
| int | squareIndex (const QString &str) const |
| int | squareIndex (const Square &square) const |
| QString | squareString (const Square &square) const |
| QString | squareString (int index) const |
| virtual QString | vFenString (FenNotation notation) const =0 |
| virtual void | vInitialize ()=0 |
| virtual bool | vIsLegalMove (const Move &move) |
| virtual void | vMakeMove (const Move &move, BoardTransition *transition)=0 |
| virtual bool | vSetFenString (const QStringList &fen)=0 |
| virtual void | vUndoMove (const Move &move)=0 |
| void | xorKey (quint64 key) |
Additional Inherited Members | |
Public Types inherited from Chess::WesternBoard | |
| enum | WesternPieceType { Pawn = 1 , Knight , Bishop , Rook , Queen , King } |
Public Types inherited from Chess::Board | |
| enum | CoordinateSystem { NormalCoordinates , InvertedCoordinates } |
| enum | FenNotation { XFen , ShredderFen } |
| enum | MoveNotation { StandardAlgebraic , LongAlgebraic } |
Protected Types inherited from Chess::WesternBoard | |
| enum | CastlingSide { QueenSide , KingSide , NoCastlingSide } |
| enum | StepType { NoStep = 0 , FreeStep = 1 , CaptureStep = 2 } |
Protected Attributes inherited from Chess::WesternBoard | |
| QVarLengthArray< PawnStep, 8 > | m_pawnSteps |
Static Protected Attributes inherited from Chess::WesternBoard | |
| static const unsigned | BishopMovement = 4 |
| static const unsigned | KnightMovement = 2 |
| static const unsigned | RookMovement = 8 |
A board for Horde Chess and Dunsany's Chess (Defaults are set to lichess.org (SF) variant)
Horde chess is a variant of standard chess with different setup. It is similar to a variant introduced by Lord Dunsany in 1942.
The black side plays with a standard set of pieces. However white has 36 pawns and no other pieces.
White has to mate the black king, black has to capture all pawns of the white horde in order to win. Standard chess rules apply. White pawns on the first and second ranks can make a double step.
HordeBoard uses Polyglot-compatible zobrist position keys, so Horde Chess opening books in Polyglot format can be used.
| Chess::HordeBoard::HordeBoard | ( | ) |
Creates a new HordeBoard object.
|
virtual |
Creates and returns a deep copy of this board.
Reimplemented from Chess::StandardBoard.
|
virtual |
Horde chess, lichess.org variant has 36 white pawns and starting FEN rnbqkbnr/pppppppp/8/1PP2PP1/PPPPPPPP/PPPPPPPP/PPPPPPPP/PPPPPPPP w kq - 0 1 Dunsany's chess only has 32 white pawns and black starts with FEN rnbqkbnr/pppppppp/8/8/PPPPPPPP/PPPPPPPP/PPPPPPPP/PPPPPPPP b kq - 0 1 Original Horde chess has 32 black pawns vs a white standard set of pieces ppp2ppp/pppppppp/pppppppp/pppppppp/3pp3/8/PPPPPPPP/RNBQKBNR w KQ - 0 1
Reimplemented from Chess::StandardBoard.
|
protectedvirtual |
Returns true if both counts of kings given by whiteKings and blackKings are correct. WesternBoard expects exactly one king per side.
Reimplemented from Chess::WesternBoard.
|
virtual |
Returns the result of the game, or Result::NoResult if the game is in progress.
Reimplemented from Chess::WesternBoard.
|
virtual |
Returns the name of the chess variant.
Reimplemented from Chess::StandardBoard.
|
protectedvirtual |
Returns true if move is a legal move.
This function is called by isLegalMove() after making sure that there is a pseudo-legal move same as move. This function shouldn't check for the existence of move by generating moves.
The default implementation only checks if the position after move is legal.
Reimplemented from Chess::WesternBoard.