chess_logic v0.2.1 ChessLogic.CommonTools
Documentation for CommonTools.
Contains helper functions to be imported in other modules.
Link to this section Summary
Functions
Returns a new rank or file index from a char
Returns a new square from a sq0x88. sq0x88 is the square representation in chessfold
Returns a new sq0x88 from a square. sq0x88 is the square representation in chessfold
Returns a new square from a string
Link to this section Functions
Link to this function
char_to_rank_or_file(char)
char_to_rank_or_file(String.t()) :: ChessLogic.PieceWithSquare.rank() | ChessLogic.PieceWithSquare.file() | nil
Returns a new rank or file index from a char.
Link to this function
sq0x88_to_square(sq0x88)
sq0x88_to_square(integer()) :: ChessLogic.PieceWithSquare.square()
Returns a new square from a sq0x88. sq0x88 is the square representation in chessfold.
Link to this function
square_to_sq0x88(map)
square_to_sq0x88(ChessLogic.PieceWithSquare.square()) :: integer()
Returns a new sq0x88 from a square. sq0x88 is the square representation in chessfold.
Link to this function
string_to_square(string)
string_to_square(String.t()) :: ChessLogic.PieceWithSquare.square()
Returns a new square from a string.