StateFlip

From Esolang
Jump to navigation Jump to search

StateFlip is a 2-D reversible program language, inspired by BackFlip.

There is four commands:

  • * toggles the current flipping state. It starts at off.
  • / and \ are mirrors. Whether or not they flip when hit is based on the current flipping state.
  • | is used to make infinite memory. If hit when moving left, it causes the program pointer to find the next | right of this one in the same row, and start moving left from there, while making everything in between (on the same row) corresponding to the next memory location (all initially start the same as the initial program is written). When hit moving right, it causes the reverse to happen. Hit | moving up or down is nothing.
  • Everything else is NOP command, you move straight through.

Normally there is no output. But if you want output, you can make some NOP command to cause output too.