No description
- Elixir 100%
|
|
||
|---|---|---|
| .woodpecker | ||
| lib | ||
| priv | ||
| test | ||
| .formatter.exs | ||
| .gitattributes | ||
| .gitignore | ||
| mix.exs | ||
| mix.lock | ||
| README.md | ||
| renovate.json | ||
Chexx
Chexx is a chess library written in Elixir.
It simulates a board with pieces, and will validate moves.
Installation
If available in Hex, the package can be installed
by adding chexx to your list of dependencies in mix.exs:
def deps do
[
{:chexx, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/chexx.
Usage
Start a new game with Chexx.start_game/0, and move with Chexx.ply/2.
iex> game = Chexx.start_game()
#Chexx.Game<current_player: :white, status: :in_progress, ...>
iex> {:ok, game} = Chexx.ply(game, "e3")
...> game
#Chexx.Game<current_player: :black, status: :in_progress, ...>