Slot module
Properties:
Name | Type | Description |
---|---|---|
x |
number | Position x |
y |
number | Position y |
V |
number | Voltage through this slot |
count |
number | Number of all connected Components |
activeCount |
number | Number of all connected non-disabled/active Components |
connections |
Map | Map of Connections in this Slot. Key is component_id and Value is { pin_index, component } |
activeConnections |
Map | Same as connections property but only contains active ones |
isTrueNode |
boolean | Indicates if this slot has >= 3 active connections or not |
hasAllTraveled |
boolean | Indicates if all components has been traveled by Traverser or not |
untraveledConnections |
Array.<Connection> | Array of all untraveled Connections |
Methods
(protected) add(component, pin_index)
- Source:
- See:
-
- Use Component#place method instead
Add component to this Slot
Parameters:
Name | Type | Description |
---|---|---|
component |
Component | |
pin_index |
number |
(protected) remove(component)
- Source:
- See:
-
- Use Component#remove method instead
Remove component from this Slot
Parameters:
Name | Type | Description |
---|---|---|
component |
Component |