TODO: Add description
- Board
- Movements
- Pawn
- Rook
- King
- Queen
- Bishop
- Knight
- Create game
- Pion's en passant
- Castling
- Checkmate
- Checking possible checkmate for next turn
- Pawn's promotion at last line
- PGN coordinates on Board Struct
If available in Hex, the package can be installed
by adding chess
to your list of dependencies in mix.exs
:
def deps do
[
{:chess, "~> 0.1.0"}
]
end
Chess.new_game()
%Chess.Game{
board: %Chess.Board{...},
pgn: nil
}
Stone the game struct, all operations needs this struct
game = Chess.new_game()
Chess.Game.moves?(game, "a2")
%Chess.Movements.Movement{
coords: ["a2", "a3", "a4"],
end: "a4",
special_move: false,
start: "a2"
}
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/chess.