Advertisement
Thiefstep

Sniff

Feb 19th, 2020
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.36 KB | None | 0 0
  1. ;; sniff left and right, and go where the strongest smell is
  2. to uphill-nest-scent  ;; turtle procedure
  3.   let scent-ahead nest-scent-at-angle   0
  4.   let scent-right nest-scent-at-angle  45
  5.   let scent-left  nest-scent-at-angle -45
  6.   if (scent-right > scent-ahead) or (scent-left > scent-ahead)
  7.   [ ifelse scent-right > scent-left
  8.     [ rt 45 ]
  9.     [ lt 45 ] ]
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement