
Commands for Helicopter cricket:
to search-and-rescue
take-off
detect-guy
pickup-guy
fly-home
end
to take-off
rotor-on
send fly-message
end
to fly-message
output 10
end
to hover-message
output 1
end
to backup-message
output 8
end
to rescue-message
output 3
end
to rotor-on
a, on
end
to rotor-off
a, off
end
to detect-guy
waituntil [not (switcha)] waituntil [(switcha)]
beep wait 1
send hover-message
end
to pickup-guy
wait 3 beep wait 1 beep
wait 5
send backup-message
wait 20
lower-ring
send rescue-message
wait 20
raise-ring
end
to lower-ring
b, thisway onfor 120
end
to raise-ring
b, thatway onfor 130
end
to fly-home
send fly-message
wait 100
send hover-message
rotor-off
end
Commands for Boom Cricket:
to go
respond next-ir
go
end
to respond :number
if (:number = 10) [fly]
if (:number = 1) [hover]
if (:number = 8) [back-up]
if (:number = 3) [rescue]
end
to fly
setpower 6 a, on thatway
end
to hover
a, off
end
to back-up
a, rd onfor 10
end
to rescue
a, rd onfor 8
end