LxChess::Game
Inherits Reference < Object
Represents a standard game of Chess
Constructors
Instance methods
board
Sourceboard=(board : Board)
Sourcecan_castle_king?(piece)
Sourcecan_castle_queen?(piece)
Sourcecastling
Sourcecastling=(string : String)
Sourcecheckmate?(turn = @turn)
TODO: Optimize Make every move and test for check, if any move results in check=false, stop checking and return false
current_player
Sourcedisambiguate_candidates(notation : Notation, move_sets : Array(MoveSet))
Attempt to reduce ambiguities in candidate moves
en_passant_target
Sourceen_passant_target=(en_passant_target : Int16 | Nil)
Sourceen_passant_target=(cord : String)
Sourcefifty_move_rule
Sourcefifty_move_rule=(fifty_move_rule : Int8)
Sourcefull_moves
Sourcein_check?(turn = @turn)
Sourcemake_move(from : String, to : String, promotion : Char | Nil = nil)
Sourcemake_move(from : Int16, to : Int16, promotion : Char | Nil = nil)
Make a move given a set of coordinates
move_clock
Sourcemove_clock=(move_clock : Int16)
Sourcemove_to_san(from : String, to : String, promotion : Char | Nil = nil, turn = @turn)
Sourcemove_to_san(from : Int, to : Int, promotion : Char | Nil = nil, turn = @turn)
Sourceplayers
Sourceremove_illegal_moves(move_set : MoveSet)
Removes moves that reveal check from a MoveSet TODO: optimize this? Maybe don't generate illegal moves and stop early for sliding pieces
set_fen_attributes(fen : Fen)
Sourcetmp_move(from : String, to : String, promotion : Char | Nil = nil, &)
Sourceturn
Sourceturn=(turn : Int8)
Source