game_server

Types

pub type Message {
  AllLegalMoves(reply_with: Subject(List(Move)))
  ApplyMove(reply_with: Subject(Game), move: Move)
  ApplyMoveUciString(reply_with: Subject(Game), move: String)
  ApplyMoveSanString(reply_with: Subject(Game), move: String)
  UndoMove(reply_with: Subject(Game))
  GetState(reply_with: Subject(Game))
  GetSideToMove(reply_with: Subject(Color))
  GetFen(reply_with: Subject(String))
  GetStatus(reply_with: Subject(Option(Status)))
  NewGame(reply_with: Subject(Game))
  NewGameFromFen(reply_with: Subject(Game), fen: String)
  DisableStatus(reply_with: Subject(Game))
  Shutdown
  PrintBoard(reply_with: Subject(Nil))
}

Constructors

  • AllLegalMoves(reply_with: Subject(List(Move)))
  • ApplyMove(reply_with: Subject(Game), move: Move)
  • ApplyMoveUciString(reply_with: Subject(Game), move: String)
  • ApplyMoveSanString(reply_with: Subject(Game), move: String)
  • UndoMove(reply_with: Subject(Game))
  • GetState(reply_with: Subject(Game))
  • GetSideToMove(reply_with: Subject(Color))
  • GetFen(reply_with: Subject(String))
  • GetStatus(reply_with: Subject(Option(Status)))
  • NewGame(reply_with: Subject(Game))
  • NewGameFromFen(reply_with: Subject(Game), fen: String)
  • DisableStatus(reply_with: Subject(Game))
  • Shutdown
  • PrintBoard(reply_with: Subject(Nil))

Functions

pub fn all_legal_moves(
  game_actor: Subject(Message),
) -> List(Move)
pub fn apply_move(
  game_actor: Subject(Message),
  move: Move,
) -> Game
pub fn apply_move_san_string(
  game_actor: Subject(Message),
  move_san: String,
) -> Game
pub fn apply_move_uci_string(
  game_actor: Subject(Message),
  move_uci: String,
) -> Game
pub fn disable_status(game_actor: Subject(Message)) -> Game
pub fn get_fen(game_actor: Subject(Message)) -> String
pub fn get_status(game_actor: Subject(Message)) -> Option(Status)
pub fn load_pgn(
  pgn_string: String,
) -> Result(Subject(Message), String)
pub fn new_game(game_actor: Subject(Message)) -> Game
pub fn new_game_from_fen(
  game_actor: Subject(Message),
  fen: String,
) -> Game
pub fn new_server() -> Subject(Message)
pub fn print_board(game_actor: Subject(Message)) -> Nil
pub fn undo_move(game_actor: Subject(Message)) -> Game
Search Document