Here's a piece of code to quickly tell you where you are in the arena. It leaves a digit on the stack after being called. The code fragment starts off with a map showing which digits go where.
============================
get-square: # 19 commands execution time
y 50 / 6 * x 50 / + 3 * get-square2 + jump
{
0 1 1 1 1 2
3 4 4 4 4 5 6x6 grid of positions
3 4 4 4 4 5 You can change these to
3 4 4 4 4 5 whatever values you want
3 4 4 4 4 5
6 7 7 7 7 8
}
get-square2:
0 swap return #0
1 swap return #1
1 swap return #2
1 swap return #3
1 swap return #4
2 swap return #5
3 swap return #6
4 swap return #7
4 swap return #8
4 swap return #9
4 swap return #10
5 swap return #11
3 swap return #12
4 swap return #13
4 swap return #14
4 swap return #15
4 swap return #16
5 swap return #17
3 swap return #18
4 swap return #19
4 swap return #20
4 swap return #21
4 swap return #22
5 swap return #23
3 swap return #24
4 swap return #25
4 swap return #26
4 swap return #27
4 swap return #28
5 swap return #29
6 swap return #30
7 swap return #31
7 swap return #32
7 swap return #33
7 swap return #34
8 swap return #35
#fallout
nop nop nop
nop nop nop
nop nop nop
nop nop nop
nop nop nop
nop nop nop
666 print
=========================
The #fallout is there in case you call this when plastered against
the right or bottom walls. If you aren't going to smack the walls, take
that out.
Example bot:
#looks at the nearest wall, or spins if it's in the middle
{push} main
get-square call
4 * lookie + jump
lookie:
-45 aim' sto jump
0 aim' sto jump
45 aim' sto jump
-90 aim' sto jump
spin jump nop nop
90 aim' sto jump
-135 aim' sto jump
180 aim' sto jump
135 aim' sto jump
main: main jump
spin: aim 190 + aim' sto spin jump