Chess v0.4.2 Chess.Move View Source

Move module

Link to this section Summary

Functions

Make new move in chess game

Link to this section Functions

Link to this function new(game, value, promotion \\ "q") View Source

Make new move in chess game

Examples

iex> Chess.Move.new(%Chess.Game{}, "e2-e4")
{:ok, %Chess.Game{}}

iex> Chess.Move.new(%Chess.Game{}, "e2-e5")
{:error, ""}