/usr/share/games/gnurobots/scheme/simple.scm is in gnurobots 2:1.2.0-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ;;; simple.scm
;;; Sample robot provided by Jim Hall <jhall1@isd.net>
;;; This robot will simply hunt down and grab any prizes in its direct
;;; line of sight. If it runs into an obstacle, it turns right and
;;; continues from there. When it has turned 360-degrees, it stops.
;;; Define a function to feel for prize (wrapper)
(define (feel-prize)
(robot-feel "prize"))
;;; Define a function to grab a single prize
(define (grab-prize)
(robot-grab)
(robot-move 1))
;;; Define a function to grab all prizes
(define (grab-all-prizes)
(do () (not (feel-prize)) (grab-prize)))
;;; The program starts here: hunt for all prizes
(grab-all-prizes)
(robot-turn 1)
(grab-all-prizes)
(robot-turn 1)
(grab-all-prizes)
(robot-turn 1)
(grab-all-prizes)
(sleep 1)
|