gchess

Package Version Hex Docs

A chess library for Gleam.

let server = new_server()

let assert Ok(_) = new_game_from_fen(
    server,
    "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
  )

print_board(server)

all_legal_moves(server)
|> list.map(move.to_string)
|> list.each(io.println)

let assert Ok(_) = apply_move_uci_string(server, "e2e4")

print_board(server)

Installation

Add the following to gleam.toml:

gchess = "~> 0.1.4"
Search Document