crow

Types

pub type Check {
  Check(
    player: Player,
    piece: Piece,
    path: List(Coordinate),
    captures: List(Coordinate),
  )
}

Constructors

  • Check(
      player: Player,
      piece: Piece,
      path: List(Coordinate),
      captures: List(Coordinate),
    )
pub type Gamestate {
  Gamestate(round: Round, board: Board)
}

Constructors

  • Gamestate(round: Round, board: Board)

Functions

pub fn deploy(state: Gamestate, position: String, player: String, piece: Piece) -> Gamestate
pub fn get_position(state: Gamestate, position: String) -> Check
pub fn get_positions(state: Gamestate) -> Map(Coordinate, Check)
pub fn move(state: Gamestate, from_position: String, to_position: String) -> Gamestate
pub fn new() -> Gamestate
pub fn players(state: Gamestate, p1: String, p2: String) -> Gamestate
Search Document