16
DNA - General / Randomness doesn't work here.
« on: September 16, 2014, 04:12:26 PM »
There should only be a 1 chance out of 3 for this bot to start shooting when energy becomes lower than body, but that is completely ignored and the bot will always shoot.
Code: [Select]
'If 50 is not 3; shoot!
cond
*.nrg *.body <
50 3 !=
start
-6 .shoot store
stop
'Reset 50 to 0 when .nrg becomes more than .body.
cond
*.nrg *.body >
start
0 50 store
100 .strbody store
stop
'Set 50 to a random number between 1 and 3 when .nrg and .body are equal.
cond
*.nrg *.body =
start
3 rnd 50 store
stop