package reactor
Ordering
- Alphabetic
Visibility
- Public
- All
Type Members
-
trait
BaseReactor[A] extends AnyRef
A reactor is a simple way to express an interactive program.
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.
-
final
case class
Reactor[A](initial: A, onTickHandler: (A) ⇒ A = (a: A) => a, tickRate: FiniteDuration = FiniteDuration(100, MILLISECONDS), renderHandler: (A) ⇒ Image = (_: A) => Image.empty, stopHandler: (A) ⇒ Boolean = (_: A) => false) extends BaseReactor[A] with Product with Serializable
A Reactor that has reasonable defaults and a simple builder style for creating more complicated behaviour.