chess_logic v0.3.0 ChessLogic.Move

Documentation for ChessLogic.Move.

Link to this section Summary

Functions

Returns a printable string from move

Select a move from a list of moves, from a san move. This accept san (eg. "e4") or coordinates (eg. "e2e4")

Link to this section Functions

Link to this function

move_to_san(moves, move)

Transforms a move to a short algebraic notation. eg. "g1f3" -> "Nf3". See : https://chess.stackexchange.com/questions/9470/converting-square-notation-to-algebraic-notation-programmatically

Link to this function

move_to_string(move)

Returns a printable string from move

Link to this function

piece_symbol(buffer, arg2, arg3, pawn, piece)

Link to this function

select_move(moves, coords_or_san, promotion_piece \\ :queen)

Select a move from a list of moves, from a san move. This accept san (eg. "e4") or coordinates (eg. "e2e4")

Returns {:ok, move} | {:error, reason}