crow

Package Version Hex Docs

A Gleam project

Quick start

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell

Installation

If available on Hex this package can be added to your Gleam project:

gleam add crow

and its documentation can be found at https://hexdocs.pm/crow.

Presentation

PRESENTATION - Gleam is expressive

Gleam is fairly simple and in some ways syntax is less expressive than what can be found in erlang or elixir:

But is just as capable of modelling most problem domains:

May or not require assertion checks when depending on Result types

We may add to this type through Generics.

TODO: Recover gamestate file here

pub type MoveError { NoPath OutOfBounds Blocked NoPiece }

pub fn move( in board: Board, from from: Position, to to: Position, ) -> Result(Board, MoveError) { try Nil = check_bounds(at: from, in: board) try Nil = check_bounds(at: to, in: board) try Nil = check_piece(at: from, in: board) try Nil = check_move(from: from, to: to, in: board) Ok(update(at: from, to: to, in: board)) }

Search Document