GameOutputs extension

on

Properties

fen String
no setter
gateSymbols List<List<String>>
Converts the internal representation of the gates to a list of piece symbols (e.g. 'P', 'q'). You probably need this for interopability with other applications (such as the Squares package).
no setter
handString String
no setter
handSymbols List<List<String>>
Converts the internal representation of the hands to a list of piece symbols (e.g. 'P', 'q'). You probably need this for interopability with other applications (such as the Squares package).
no setter
info GameInfo
no setter
moveHistory List<Move>
Get a list of moves played in the game so far.
no setter
moveHistoryAlgebraic List<String>
Get the history of the game (i.e. all moves played) in algebraic format.
no setter
moveHistorySan List<String>
Get the history of the game (i.e. all moves played) in SAN format.
no setter

Methods

algebraicMoves() List<String>
Get a list of legal moves in the current position, in algebraic format.
ascii([bool unicode = false]) String
Generates an ASCII representation of the board.
boardSymbols([bool full = false]) List<String>
Converts the internal board representation to a list of piece symbols (e.g. 'P', 'q'). You probably need this for interopability with other applications (such as the Squares package).
getCustomState(int i) int
Retrieves the value of the custom state variable i.
getDisambiguator(StandardMove move, [List<Move>? moves]) String
To be used in cases where, given a piece and a destination, there is more than one possible move. For example, in 'Nbxa4', this function provides the 'b'. Optionally, provide moves - a list of legal moves. This will be generated if it is not specified.
getMove(String algebraic) Move?
Generates legal moves and returns the one that matches algebraic. Returns null if no move is found.
getMoveSan(String san, {bool checks = false}) Move?
Gets a move from a SAN string, e.g. 'Nxf3', 'e4', 'O-O-O'. If checks is false, the '+' or '#' part of the SAN string will not be computed, which vastly increases efficiency in cases like PGN parsing.\
perft(int depth) int
Perform a perft test on the current position, to depth.
pgn({Map<String, String>? metadata, bool includeVariant = false, bool includeResult = true}) String
sanMoves() List<String>
toAlgebraic(Move move) String
Returns the algebraic representation of move, with respect to the board size.
toSan(Move move, {List<Move>? moves, bool checks = true}) String
Returns the SAN (Standard Algebraic Notation) representation of a move. Optionally, provide moves - a list of legal moves in the current position, which is used to determine the disambiguator. Use this if you need speed and have already generated the list of moves elsewhere. If checks is false, the '+' or '#' part of the SAN string will not be computed, which vastly increases efficiency in cases like PGN parsing.