chex v0.1.2 Chex.Game
Functions for playing a chess game.
Link to this section Summary
Functions
Creates a new game from fen
.
Link to this section Types
Link to this section Functions
Link to this function
move(game, move)
move(Chex.Game.t(), Chex.Game.move() | String.t()) :: Chex.Game.t() | {:error, atom()}
Link to this function
new(fen \\ "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")
new(String.t()) :: Chex.Game.t()
Creates a new game from fen
.
Returns a %Chex.Game{} initialized with fen or the default starting positions.
Examples
iex> Chex.Game.new() %Chex.Game{} iex> Chex.Game.new("rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1") %Chex.Game{}