Kleinfunge

From Esolang
Jump to navigation Jump to search

Kleinfunge is a topology-oriented 2-dimensional fungeoid.

Commands

Basic Fungeoidal Commands
Command Description
< Start going in direction 1
> Start going in direction 2
^ Start going in direction 3
v Start going in direction 4
| Pop a value off the stack. If 0, start going in direction 1. Else, start going in direction 2.
_ Pop a value off the stack. If 0, start going in direction 3. Else, start going in direction 4.
Utility Commands
Command Description
. Pop a number and print its unicode equivalent
, Get a character and push its unicode value
Topological Commands
Command Description
] Pop a value off the stack called d. d=(d%4)+1. Pop a value off the stack and call it r. r=r%9. Rotate direction d counterclockwise by r*45 degrees.
[ Pop a value off the stack called d. d=(d%4)+1. Pop a value off the stack and call it r. r=r%9. Rotate direction d clockwise by r*45 degrees.
0 Pop x1, pop y1, pop x2, pop y2, Create a Stargate (1-way wormhole) from (x1, y1) to (x2, y2)