class

LxChess::PGN

Inherits Reference < Object

Constants

COMMENT_REGEX = /\s*\{[^\}]+\}\s*/i
SAN_REGEX = /\ ([A-Z])? # piece ([a-z])?(\d)? # disambiguation x? # takes ([a-z]\d|O-O(?:-O)?) # destination (\=\s*[A-Z])? # promotion ([\+\#])? # check\/checkmate (\s*e\.?\s*p\.?)? # en passant /x
TAG_REGEX = /\[(?<key>[a-z]+)\s+(?<value>[^\]]+)\]/i
TURN_REGEX = /\d+\.+\s*/
VARIATION_REGEX = /\s*\([^\)]+\)\s*/i

Constructors

new(pgn : String)
Source
new(game : LxChess::Game = Game.new)
Source

Instance methods

changes
Source
changes=(changes : Array(Array(LxChess::Change)))
Source
game
Source
game=(game : Game)
Source
history
Source
history=(history : Array(LxChess::Notation))
Source
strings
Source
tags
Source
tags=(tags : Hash(String, String))
Source
to_s

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.

Source