Labyrinth-- is a two-dimensional programming language that transcompiles to brainfuck.
The language consists of five commands.
| Character | Meaning |
|---|---|
# |
wall |
|
space |
A |
start, entrance |
B |
end, goal |
\n |
new line |
The instruction pointer is trying to move from point A to point B using right-hand rule. The transcompiled code is determined by the movement of instruction pointer.
| (n-2) moves in the same direction (if n > 2) | |
| ➡️ | > |
| ⬅️ | < |
| ⬆️ | + |
| ⬇️ | - |
| T-junction (if instruction pointer hits the wall) | |
| ➡️ | [ |
| ⬅️ | ] |
| ⬆️ | . |
| ⬇️ | . |
| four-way junction | |
| #️⃣ | , |
The first move is first legal move of: ⬆️, ➡️, ⬇️, ⬅️.