Punchcard Reader
Appearance

Besides the Punchcard Machine, this is the second block needed for using punch cards. It is capable of reading the Punchcard that is currently in the reader-slot (see the image below). It is also capable of shifting items from right-to-left in the 'Input slots' row, then into the 'Reader slot' and then left-to-right into and in the 'Output slots' row.

Provided component
This block provides the punchcardReader component, offering the following properties:
| Name | Type | Read/Write | Description |
|---|---|---|---|
hasCardInReader |
boolean |
READ | Returns whether a punchcard is located in the reader slot. |
unreadCardCnt
|
integer
|
READ | Returns how many punchcards are located in the top Input slot row, excluding the reader slot. |
freeOutSlotCnt
|
integer
|
READ | Returns how many slots of the Output slots are empty, excluding the reader slot. |
| Name | Type | Description |
|---|---|---|
:read(shiftCards:boolean) |
String |
If shiftCards is false, returns the contents of the card in the reader slot, or errors if none exists
if |
:shift() |
boolean |
Shifts any existing card in the reader slot down into the output slots and shifts those to the right. Then shifts the input slots to the left, attempting to put a punchcard into the reader slot. Returns whether the inventory was modified. |