LxChess::TermGame
Inherits Reference < Object
Represents a chess game played through the terminal
Constants
HELP_TEXT = " Commands:\n flip - Flip the board\n moves [SQUARE] - Show the moves (optionally for a given square)\n [SAN] - Standard algebraic notation (make a move)\n [FROM] [TO] - specify move by coordinates"
LOG_LENGTH = 20
Constructors
new(fen : Fen, players = [Player.new, Player.new])
SourceInstance methods
changes
Sourceclear_screen
Sourcedraw
Sourcegame
Sourcegame=(game : Game)
Sourcegb
Sourcegb=(gb : TermBoard)
Sourcelog
Sourcemake_move(from : String, to : String, promotion : Char | Nil = nil)
Sourcemake_move(from : Int16, to : Int16, promotion : Char | Nil = nil)
Sourcepgn
Sourcepgn=(pgn : PGN)
Sourcerun!
Sourceshow_help
Sourceterm
Sourceterm=(term : Terminal)
Sourceupdate
Source