mogs v0.2.0 Mogs.Board.Command behaviour

This module defines a behaviour for module-based commands that define a command as a struct and callbacks to handle such commands with a board.

Adopting the behaviour with use Mogs.Board.Command imports the helpers to define a command result.

Link to this section Summary

Link to this section Types

Link to this type

command_result()

Specs

command_result() :: Mogs.Board.Command.Result.t()

Specs

t() :: struct() | {module(), data :: any()}

Link to this section Functions

Link to this function

run_command(command, board)

Link to this function

run_timer(mod, data, board)

Link to this section Callbacks

Link to this callback

run(struct, arg2)

Specs