Ascii.Env (Ascii v0.3.0)

Copy Markdown View Source

What a frame is drawn for, upstream's env plus the size and the clock.

  • paper: ink is dark on a light ground, so shaded pieces flip their ramp.
  • color?: colours are wanted. A coloured piece then returns a palette index for every cell; otherwise it draws the one-ink version and returns nil colours.
  • now: the wall clock for clock: true pieces, as a DateTime whose offset gives the local time. nil reads the system clock. Tests pin it.

Summary

Types

t()

@type t() :: %Ascii.Env{
  color?: boolean(),
  cols: pos_integer(),
  now: DateTime.t() | nil,
  paper: boolean(),
  rows: pos_integer()
}