Snake painter

www.manwe.ru

\ use W A S D keys and be quick!

: y2 y .5 + 1.6 / ;
y2 log x y2 x ** y2 log z* 2dup ** rot exp

0 @ not if 1 0 ! then

: s
swap
dup r> 1 + dup >r !
dup 32 / floor x 32 * floor =
swap 32 mod y 32 * floor = * +
;

15 @ 14 @ 13 @ 12 @ 11 @ 10 @ 9 @ 8 @ 7 @ 6 @ 5 @ 4 @ 3 @ 2 @

1 button if -32 0 ! then
5 button if 32 0 ! then
2 button if 1 0 ! then
3 button if -1 0 ! then

0 0 >r
s s s s s s s s s s s s s s
r@ @ 0 @ + swap s

r> drop
>r
rot r@ *
rot r@ *
rot r> * .2 +