The world's running machines — movers, lights, switch timers — kept as
Cauldron2D.Thinkers, and which sectors a mover has taken. A sector taken by one mover
is not given to another until the first is released.
Summary
Functions
Whether a mover has taken sector.
The mover on sector, as {id, mover}, or nil.
Give sector back once its mover has stopped.
Start thinker.
Start mover on sector, taking the sector.
Replace thinker id with fun.(thinker).
Apply fun to every thinker match? accepts.
Functions
@spec busy?(ElixirDoom.World.t(), non_neg_integer()) :: boolean()
Whether a mover has taken sector.
@spec mover(ElixirDoom.World.t(), non_neg_integer()) :: {pos_integer(), map()} | nil
The mover on sector, as {id, mover}, or nil.
@spec release(ElixirDoom.World.t(), non_neg_integer()) :: ElixirDoom.World.t()
Give sector back once its mover has stopped.
@spec start(ElixirDoom.World.t(), map()) :: ElixirDoom.World.t()
Start thinker.
@spec start_mover(ElixirDoom.World.t(), non_neg_integer(), map()) :: ElixirDoom.World.t()
Start mover on sector, taking the sector.
@spec update(ElixirDoom.World.t(), pos_integer(), (map() -> map())) :: ElixirDoom.World.t()
Replace thinker id with fun.(thinker).
@spec update_where(ElixirDoom.World.t(), (map() -> boolean()), (map() -> map())) :: ElixirDoom.World.t()
Apply fun to every thinker match? accepts.