chess_logic v0.2.0 ChessLogic.Piece

Documentation for Piece.

Helper functions a la Haskell, to display/load a piece, or piece type.

Link to this section Summary

Functions

char -> piece

char -> piece_type

piece -> char

piece_type -> char

Link to this section Types

Link to this type pcolor()
pcolor() :: :black | :white
Link to this type ptype()
ptype() :: :king | :queen | :rook | :bishop | :knight | :pawn
Link to this type t()
t() :: %ChessLogic.Piece{pcolor: pcolor(), ptype: ptype()}

Link to this section Functions

Link to this function read_piece(binary)
read_piece(String.t()) :: t() | :empty

char -> piece.

Link to this function read_piece_type(arg1)
read_piece_type(String.t()) :: atom()

char -> piece_type.

Link to this function show_piece(arg1)
show_piece(t() | :empty) :: String.t()

piece -> char.

Link to this function show_piece_type(arg1)
show_piece_type(atom()) :: String.t()

piece_type -> char.