class LxChess::Fen
- LxChess::Fen
- Reference
- Object
Overview
Forsyth-Edwards Notation parser and converter
Defined in:
lx_chess/fen.crConstant Summary
-
FEN_REGEX =
/\ (?<placement>(?:[PKQRBN\d\/]+)+)\s+ (?<turn>[a-z])\s+ (?<castling>[a-z\-]+)\s+ (?<en_passant>[a-z\d\-]+)\s+ (?<half_clock>\d+)\s+ (?<full_clock>\d+) /ix
-
STANDARD =
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
Constructors
Class Method Summary
Instance Method Summary
- #board : Board
- #board=(board : Board)
- #castling : String
- #castling=(castling : String)
- #en_passant : String
- #en_passant=(en_passant : String)
- #fullmove_counter : Int16
- #fullmove_counter=(fullmove_counter : Int16)
- #halfmove_clock : Int8
- #halfmove_clock=(halfmove_clock : Int8)
- #placement
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #turn : String
- #turn=(turn : String)
- #update(game : Game)
Constructor Detail
def self.new(board : LxChess::Board, turn : String = "w", castling : String = "KQkq", en_passant : String = "-", halfmove_clock : Int8 = 0, fullmove_counter : Int16 = 1)
#
Class Method Detail
Instance Method Detail
def to_s
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.