class

Wireland::Circuit

Inherits Reference < Object

The whole simulated program

Constructors

new(filename : String, palette_file : String)
Source
new(filename : String, palette : Wireland::Palette = Wireland::Palette::DEFAULT)
Source
new(image : R::Image, palette : Wireland::Palette = Wireland::Palette::DEFAULT)
Source

Instance methods

[](index)

Gets a component at index

Source
[]?(index)

Gets a component at index but with a question mark. :)

Source
active_pulse(id, to : Array(UInt64))

Queues up a list of active pulses for the next tick. Used by active components.

Source
active_pulse(id, to : UInt64)

Queues up an active pulses for the next tick. Used by active components.

Source
active_pulses

List of pulses that need to

Source
components

List of all components in this circuit

Source
components=(components : Array(Wireland::Component))

List of all components in this circuit

Source
height
Source
height=(height : Int32)
Source
increase_ticks
Source
last_id
Source
load(image : R::Image, palette : Wireland::Palette = Wireland::Palette::DEFAULT)
Source
mid_tick
Source
palette

Palette of colors that will be loaded into our component classes.

Source
palette=(palette : Wireland::Palette)

Palette of colors that will be loaded into our component classes.

Source
post_tick
Source
pre_tick
Source
pulse_inputs
Source
reset

Resets the circuit to tick 0

Source
tick

Main logic route for the circuit

Source
ticks

Number of ticks that have run since the circuit started.

Source
ticks=(ticks : Int32 | UInt128)

Number of ticks that have run since the circuit started.

Source
width
Source
width=(width : Int32)
Source