def tbot 971
def head 20
def bodyp 972
def trig 21
def eye 22

''birth

cond
*.robage 0 =
start
.tbot inc
stop

cond
*.robage 2 =
*.head 0 =
start
*.tiepres .bodyp store
stop

''nrg

start
50 .sharenrg store
stop

cond
*.bodyp 2 !=
start
100 *.body sub 0 floor .strbody store
*.body 100 sub 0 floor .fdbody store
stop

''head

'feeding

'moving

'turning

'botbuilding

cond
*.head 1 =
start
314 .tieang1 store
-314 .tieang2 store
628 .tieang3 store
100 .tielen1 store
100 .tielen2 store
100 .tielen3 store
*.tin2 .tout2 store
stop

cond
*.head 1 =
*.numties 3 =
*.trig 2 =
start
1 .tie store
0 .trig store
stop

cond
*.head 1 =
*.numties 2 =
*.trig 0 =
start
50 .repro store
2 .trig store
stop

cond
*.head 1 =
*.trig 1 =
start
2 .tie store
0 .trig store
stop

cond
*.head 1 =
*.numties 2 <
*.trig 0 =
start
50 .repro store
1 .trig store
stop

''body

'moving

'turning

'botbuilding

''tenticals

cond
*.bodyp 2 =
*.tin2 1 >
*.eye 0 =
start

''repro

cond
*.numties 0 =
start
1 .head store
0 .tbot store
0 .bodyp store
stop

cond
*.bodyp 1 =
*.tbot 5 =
*.nrg 5000 >
start
1 .deltie store
1 .head store
0 .tbot store
0 .bodyp store
stop