class LxChess::TermGame

Overview

Represents a chess game played through the terminal

Defined in:

lx_chess/term_game.cr

Constant Summary

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

Instance Method Summary

Constructor Detail

def self.new(fen : Fen, players = [Player.new, Player.new]) #

[View source]
def self.new(pgn : LxChess::PGN = PGN.new, players = [Player.new, Player.new]) #

[View source]

Instance Method Detail

def changes : Array(Array(LxChess::Change)) #

[View source]
def changes=(changes : Array(Array(LxChess::Change))) #

[View source]
def clear_screen #

[View source]
def draw #

[View source]
def game : Game #

[View source]
def game=(game : Game) #

[View source]
def gb : TermBoard #

[View source]
def gb=(gb : TermBoard) #

[View source]
def log : Array(String) #

[View source]
def make_move(from : String, to : String, promotion : Char | Nil = nil) #

[View source]
def make_move(from : Int16, to : Int16, promotion : Char | Nil = nil) #

[View source]
def pgn : PGN #

[View source]
def pgn=(pgn : PGN) #

[View source]
def run! #

[View source]
def show_help #

[View source]
def term : Terminal #

[View source]
def term=(term : Terminal) #

[View source]
def update #

[View source]