ZZT-Flip

From Esolang
Jump to navigation Jump to search


ZZT-Flip is a variant of BackFlip that User:Zzo38 implemented with ZZT.

The commands are:

  • A variant of the BackFlip arrows, where instead of the arrow now pointing where you came from, they point into the direction you were moving in (the opposite direction from BackFlip).
  • A ricochet which reverses the direction of program execution when hit.
  • Empty space (NOP).

The program can be reversed by reversing the direction of program execution and also reversing all arrows.

Implementing in ZZT

  • The initial point of the program is a bullet.
  • The arrows are a empty or fake or water with the same stats like a bullet; i.e. having cycle 1 and the direction set.
  • The ricochet is a ZZT ricochet.

Because the stats are executed in order, once a bullet moves into the space with the other stat, now that stat is executed now that it is a bullet it can do something, which is to move away; the original stat from the original bullet remains, but which is no longer a bullet.

Note that in ZZT it is actually possible for the direction of a stat to be any pair of integers (X delta and Y delta), rather than only having to be the four ways (although directions other than these four cannot be added using the built-in editor of ZZT, but it is possible with ZZTQED).