global [time light] to TOWER countdown 10 flash_light 5 collapse waituntil [newir?] ;receiving signal from ;dragon's cricket after ;dragon has been ;defeated beep rise end to display :n ;flashes n on LED bsend $14e bsend 0 bsend :n end to countdown :secs settime :secs repeat (time + 1) [display time wait 10 beep settime (time - 1)] end to flash_light :times ;light blinks times times repeat :times [blinker thisway onfor 5 wait 2] end to collapse ;lets tower down pulley thisway onfor 50 end to rise ;pulls tower back up pulley thatway onfor 50 end to pulley a, end to blinker b, end to initialize pulley setpower 8 blinker setpower 8 ;setlight light-sensor setlight 20 end to DRAGON initialize neck on waituntil [light-off] neck off loop[send 1 beep] end to light-off ;output light-sensor < (light / 2) ; or we can set it ;at around 20 output (light-sensor < light) end to light-sensor output sensora end to neck a, end