home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / a / control / solutions / buggy_2 < prev    next >
Encoding:
Text File  |  1991-01-02  |  218 b   |  14 lines

  1. / This solves the buggy problem
  2. / the further away the buggy is the further it moves
  3.  
  4. beacon 
  5. repeat
  6.   if lefteye > righteye
  7.   then
  8.     left
  9.   else                
  10.     right
  11.   endif
  12.   forward distance /2
  13. until arrived
  14.