5code
Jump to navigation
Jump to search
5code is a bf derivative created by User:CodeIsEsotericWithMe.
Overview
There is a "robot" that moves around the following square, starting at room X:
+—-+—-+—-+ |. |O |, | +—-+—-+—-+ |- |X |< | +—-+—-+—-+ |+ |# |> | +—-+—-+—-+
When the robot enters +-,.>< the respective command is executed, then the robot goes to room X. The robot has a toggle thas is set to 0, an infinite tape, all set to 0, and a pointer. The rooms are as follows:
- +: Increment the cell and trigger the toggle.
- -:Decrement the cell.
- >:Move the pointer right.
- <:Move the pointer left.
- .:Output the cell.
- ,:Input a value from STDIN to the cell.
Commands
- ^:If on room O, go right. Else, go up.
- <:Go left.
- v:If the toggle is at 1, go right. Else, go down. In either case, trigger the toggle.
- [ and ]: as bf.