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)
SourceInstance methods
changes
Sourcegame
Sourcegame=(game : Game)
Sourcehistory
Sourcestrings
Sourcetags
Sourcetags=(tags : Hash(String, String))
Sourceto_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.