Turtle just want to dig
Turtle just want to dig is a esolang based on how when User:Yayimhere(the creator of the esolang) was sitting with his turtle and it just began digging.
how it works
the program is a grid set up like this:
ñ === # #
heres how it works:
ñ
is the turtle and moves to the right and digs when it can deleting the ground it digs. when it hits the edge of the program it turns 180 degrees. A program can have multiple turtles and if they collided they turn 180 degrees. After the turtle has dug a single row it moves back up to the surface=
is the ground. the turtle moves over it. its the top layer of the ground. If there is a non diggable ground underneath if wont be dug#
is non diggable ground. if its underneath The turtle when it digs it cant dig down into that spaceõ
is a bug. If the turtle is above it it checks:
- if there is a space left of the bug the bug moves to that space
- if there is a space to the right of the bug it moves to that space
- if there are no spaces to the left or right the turtle moves down into it destroying it
- if there are space to the both left and right AND the below space is a space it will move down into it
- however if there is not an space to move into, the bug will be deleted
it will halt if it gets out of bounds. so the above example becomes:
= = # # ñ
The program halts if the turtle goes out of bounds
extension
there is two extensions. the first one is the binary extension
binary extension
this extension will output the binary version of the grid every iteration. a conversion happens like this:
- first print the first row in binary and a newline
- then the second
- and so on
a 1 will be there if the space is anything else than a space. a 0 is just a space. so the example program will print:
100 111 101
at the start of the program. and the halting iteration will print:
000 101 101 010
the printing extension
this extension will print any char the turtle lands on thats not a command. that char will also be ignored.
examples
infinite loop:
ñ == ##
or and expanding one:
ñ === # # õ