game_server
Types
pub type Message {
AllLegalMoves(reply_with: Subject(List(Move)))
ApplyMove(reply_with: Subject(Game), move: Move)
ApplyMoveUCI(reply_with: Subject(Game), move: String)
UndoMove(reply_with: Subject(Game))
GetFen(reply_with: Subject(String))
Shutdown
PrintBoard(reply_with: Subject(Nil))
}
Constructors
-
AllLegalMoves(reply_with: Subject(List(Move)))
-
ApplyMove(reply_with: Subject(Game), move: Move)
-
ApplyMoveUCI(reply_with: Subject(Game), move: String)
-
UndoMove(reply_with: Subject(Game))
-
GetFen(reply_with: Subject(String))
-
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_uci(
game_actor: Subject(Message),
move_uci: String,
) -> Game
pub fn from_fen(fen_string: String) -> Subject(Message)
pub fn get_fen(game_actor: Subject(Message)) -> String
pub fn new_game() -> Subject(Message)
pub fn print_board(game_actor: Subject(Message)) -> Nil
pub fn undo_move(game_actor: Subject(Message)) -> Game