Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. Red [
  2. Author: ["Didier Cadieu" "Nenad Rakocevic"]
  3. File: %worm.red
  4. Needs: 'View
  5. Note: "Known bug: if the number of balls if > 25, the app freezes."
  6. ]
  7.  
  8. win: layout [
  9. size 400x500
  10. across
  11. style ball: base 30x30 0.0.0.255 draw [fill-pen blue circle 15x15 14]
  12. ball ball ball ball ball ball ball ball return
  13. ball ball ball ball ball ball ball ball return
  14. ball ball ball ball ball ball ball ball return
  15. b: ball loose
  16. do [b/draw/2: red]
  17. ]
  18.  
  19. follow: func [left right /local o][
  20. all [pair? o: left/extra left/offset: left/offset + o / 2]
  21. left/extra: right/offset
  22. ]
  23.  
  24. faces: win/pane
  25. while [not tail? next faces][
  26. react/link/later :follow [faces/1 faces/2]
  27. faces: next faces
  28. ]
  29. view win
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement