mirror of https://github.com/dirtbags/moth.git
53 lines
1.2 KiB
Plaintext
Executable File
53 lines
1.2 KiB
Plaintext
Executable File
|
|
>addsensor(50, 0, 10, 1);
|
|
>addsensor(35, 0, 90, 0);
|
|
>addsensor(100, 30, 59, 0);
|
|
>addsensor(100, 330, 59, 0);
|
|
>addsensor(70, 180, 180);
|
|
>addsensor(100, 90, 59, 0);
|
|
>addsensor(100, 270, 59, 0);
|
|
>addsensor(100, 0, 5, 1);
|
|
|
|
>addsensor(55, 50, 89, 0);
|
|
>addsensor(55, 310, 89, 0);
|
|
|
|
# move back and forth
|
|
: move(90,90).turretset(0);
|
|
random(2,6) : move(95,75).turretset(0);
|
|
#random(1,6) : move(75,95).turretset(0);
|
|
|
|
# rear sensor
|
|
sense(4) : move(90, 90);
|
|
|
|
# far right front sensor
|
|
sense(5) : move(100,-100);
|
|
|
|
# far left front sensor
|
|
sense(6) : move(-100,100);
|
|
|
|
# right front sensor
|
|
sense(2) : move(80,-80);
|
|
|
|
# left front sensor
|
|
sense(3) : move(-80,80);
|
|
|
|
# immediate front sensor in firing range
|
|
sense(0) & firenotready() : move(-50, -50);
|
|
: turretset(0);
|
|
|
|
# near far right front sensor
|
|
sense(8) : move(60,-60);
|
|
sense(9) : move(-60, 60);
|
|
|
|
fireready() : led();
|
|
|
|
# front far sensor
|
|
sense(7) & fireready() : move(100,100);
|
|
|
|
# collison sensor
|
|
sense(1) : move(-100, -100);
|
|
: turretset(0);
|
|
|
|
sense(0) & fireready() : fire();
|
|
|