BrainDestructionByCode I
BrainDestructionByCode I is an esoteric language designed to drive the programmer insane, created by threesodas.
Cells of BDBCI
BDBCI is a cell based programming language, similar to brainfuck. It has a finite amount of cells (20,000), and each cell's numeric value can be used to execute ASCII code.
Every time a character is read by an interpreter, every value is shifted one cell to the right. This includes the very first character. So, cells will end up looking like this:
Code: ++ Cells: 002
NOTE: All cells are always shifted BEFORE an action is executed by the interpreter.*
Code must be optimized to fit this challenge.
Valid Characters
The following is a list of BDBCI characters and their respective actions.
| Character | Action |
|---|---|
| + | Increment a cell by one |
| - | Decrement a cell by one |
| > | Shift one cell to the right |
| < | Shift one cell to the left |
| » | Shift two cells to the right |
| « | Shift two cells to the left |
| ⇥ | Shift three cells to the right |
| ⇤ | Shift three cells to the left |
| [ | Create a loop |
| ] | End a loop on the condition that the current cell value is zero |
| r | Shift all cell values left until the first cell is a value other than zero |
| . | Print the ASCII value of the current cell value |
| , | Set the current cell to the ASCII value of a user's input character |
*The r character is the ONLY exception when it comes to actions that shift cell values. Cell values never shift when this character is executed.