A reactor is a simple way to express an interactive program. It allows us to write programs in terms of some initial state and transformations of that state in response to inputs and clock ticks.
This is the basic interface. See Reactor for a more user friendly implementation.
It is based on * the same abstraction in Pyret.
- Companion:
- object
- Source:
- BaseReactor.scala
Value members
Abstract methods
Concrete methods
def run[Alg <: Basic, F[_], Frame, Canvas](frame: Frame)(implicit a: AnimationRenderer[Canvas], e: Renderer[Alg, Frame, Canvas], m: MouseClick[Canvas] & MouseMove[Canvas], runtime: IORuntime): Unit
Runs this reactor, drawing on the given frame
, until stop
indicates it
should stop.
Runs this reactor, drawing on the given frame
, until stop
indicates it
should stop.
- Source:
- BaseReactor.scala
Run one tick of this reactor, drawing on the given frame
. Returns the
next state, or None if the Reactor has stopped.
Run one tick of this reactor, drawing on the given frame
. Returns the
next state, or None if the Reactor has stopped.
- Source:
- BaseReactor.scala