ExPilot.Terminal (ExPilot v0.1.1)

Copy Markdown View Source

ExPilot in a terminal, with the desktop's flow: a title of its own, play here, connect to a node or a server, host a server, the leaders — the arenas, settings and play themselves being Cauldron2D.Drafter.Client started at its lobby and driven from here.

Drafter.run(ExPilot.Terminal, props: %{username: "alice"})

Keys

Title: Enter play here, c connect, l leaders, h host a server, q or Esc quit. Connect and host: Tab between the fields, Enter in a field or on the button does it, Esc title. Leaders: / period, Tab metric, Esc title. In the client, its own keys; Esc from its lobby comes back here.

Mount props

  • :username — the pilot's name. Default pilot
  • :url, :node, :cookie — what the connect form starts with

Summary

Functions

keybindings()

on_ready(state)

Callback implementation for Drafter.App.on_ready/1.

on_timer(timer_id, state)

Callback implementation for Drafter.App.on_timer/2.