Scid
4.7.0
|
Store the type and position of the pieces compatibly with the SCID4 coding. More...
#include <fastgame.h>
Public Member Functions | |
int8_t | getKingIdx () const |
SCID4 encoded games must use index 0 for kings. More... | |
pieceT | getPieceType (colorT color, int idx) const |
Return the type of the piece with index idx. More... | |
squareT | getSquare (colorT color, int idx) const |
Return the square position of the piece with index idx. More... | |
void | move (colorT color, int idx, squareT to) |
Change the square position of the piece with index idx. More... | |
void | promote (colorT color, int idx, pieceT piece_type) |
Change the type of the piece with index idx. More... | |
squareT | remove (colorT color, int removed_idx, int lastvalid_idx) |
Remove the piece with index removed_idx. More... | |
void | set (colorT color, int idx, squareT sq, pieceT piece_type) |
Set the type and square of the piece with index idx. More... | |
Store the type and position of the pieces compatibly with the SCID4 coding.
Definition at line 82 of file fastgame.h.
|
inline |
SCID4 encoded games must use index 0 for kings.
Definition at line 90 of file fastgame.h.
Return the type of the piece with index idx.
Definition at line 93 of file fastgame.h.
Return the square position of the piece with index idx.
Definition at line 101 of file fastgame.h.
Change the square position of the piece with index idx.
Definition at line 109 of file fastgame.h.
Change the type of the piece with index idx.
Definition at line 117 of file fastgame.h.
Remove the piece with index removed_idx.
Piece's indexes are important for decoding SCID4 moves: when a piece is removed it's index is used by the last valid index lastvalid_idx. Return the square of the new piece with index removed_idx.
Definition at line 128 of file fastgame.h.
Set the type and square of the piece with index idx.
Definition at line 138 of file fastgame.h.
pieceT PieceList::piece_type |
Definition at line 85 of file fastgame.h.
squareT PieceList::sq |
Definition at line 84 of file fastgame.h.