class

Wireland::Component

Inherits Reference < Object

A wire instruction like WIRE, ALTWIRE, JOIN, ETC

Constructors

new(parent : Wireland::Circuit, data : BitArray, bounds : Rectangle)
Source

Class methods

active?

Does this component delay execution?

Source
all

Holds a list of all classes inheriting this class

Source
allow_adjacent?

Should we connect adjacently to another component of the same type to create a part.

Source
allow_diags?

Should we connect diagonally to another component.

Source
color

Color of the component

Source
color=(color : R::Color)

Color of the component

Source
none

Empty list for easier definition for components

Source
output_whitelist

List of Component classes that this component should not pulse out to.

Source
passive?
Source

Instance methods

[](x, y)
Source
[]?(x, y)
Source
abs_data(x, y)
Source
abs_data?(x, y)
Source
bounds
Source
color
Source
conductive=(conductive : Bool)

Can this component conduct in and out? Used by relay poles to turn off and on a component.

Source
conductive?

Can this component conduct in and out? Used by relay poles to turn off and on a component.

Source
connects

What this component is connected out to.

Source
connects=(connects : Array(UInt64))

What this component is connected out to.

Source
data
Source
high?

Has this component been pulsed this tick?

Source
id

The id of this component

Source
id=(id : UInt64)

The id of this component

Source
low?

Has this component not been pulsed this tick?

Source
on_high

Events What to do when getting a pulse every tick

Source
on_low

What to do when not getting a pulse every tick

Source
on_pulse(from_id : UInt64)

What should be done when this part receives a new charge from a new source

Source
on_tick

Used by active components to handle end of tick behavior.

Source
parent

TODO: REMOVE THIS, PASS THIS IN AS ARG INSTEAD Link to the parent circuit

Source
points
Source
pulse_in(from_id : UInt64)
Source
pulse_out(to_id : UInt64)
Source
pulse_out
Source
pulsed_by?(id)

TODO: DELETE THIS, ITS UNUSED Was this component pulsed by a component with id?

Source
pulses

TODO: CHANGE THIS TO BOOL The list of pulses incoming to this component from which component id.

Source
pulses=(pulses : Array(UInt64))

TODO: CHANGE THIS TO BOOL The list of pulses incoming to this component from which component id.

Source
setup
Source
size
Source
terminal?
Source

Nested types