361
The Gene depository / Handy Genes
« on: August 25, 2005, 10:58:46 AM »
Well, the refeye line is wrong. Added without thinking. I need to mult it with the eye5 value.
if ((eye1 > eye2) &&
(eye1 > eye3) &&
(eye1 > eye4) &&
(eye1 > eye5) &&
(eye1 > eye6) &&
(eye1 > eye7) &&
(eye1 > eye8) &&
(eye1 >= eye9))
{
-140 is put on the stack
}
if (similar thing for eye2..)
{
the angle you want to turn to if eye2 has the largest value goes onto the stack
}
...[similar things for eyes 3, 4, 6, 7, 8, 9]...
Eye5 (if larger or equal to everything else) puts -1 on the stack instead of a larger number..
add add add add add add add add dup
'adds up all the numbers (8 of which should logically be zeroes. I assumed integer
'values for the eyes - this is wrong if they can be other things)
'and copies the top one
1 add dup div -2 mult 7 add
'this puts a 7 on the stack if the top number on the stack is -1
'and a 5 if it is something else
store
'so we get the result of the giant mess up there stored in either address 5 or address 7..
I never made any bots before.
I just thought the stack abuse was an interesting puzzle ^^
if ((eye1 > eye2) &&
(eye1 > eye3) &&
(eye1 > eye4) &&
(eye1 > eye5) &&
(eye1 > eye6) &&
(eye1 > eye7) &&
(eye1 > eye8) &&
(eye1 >= eye9))
{
-140 is put on the stack
}
if (similar thing for eye2..)
{
the angle you want to turn to if eye2 has the largest value goes onto the stack
}
...[similar things for eyes 3, 4, 6, 7, 8, 9]...
Eye5 (if larger or equal to everything else) puts -1 on the stack instead of a larger number..
add add add add add add add add dup
'adds up all the numbers (8 of which should logically be zeroes. I assumed integer
'values for the eyes - this is wrong if they can be other things)
'and copies the top one
1 add dup div -2 mult 7 add
'this puts a 7 on the stack if the top number on the stack is -1
'and a 5 if it is something else
store
'so we get the result of the giant mess up there stored in either address 5 or address 7..
I never made any bots before.
I just thought the stack abuse was an interesting puzzle ^^