Guest User

Untitled

a guest
Sep 5th, 2011
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. myGrid := PasteUpMorph new openInWorld.
  2. myGrid height: 1100;width:1100.
  3.  
  4. rnd := [(-500 to: 500) atRandom].
  5.  
  6. aRecta := RectangleMorph new.
  7. myGrid addMorph: aRecta.
  8. aRectb := RectangleMorph new.
  9. myGrid addMorph: aRectb.
  10. aRectc := RectangleMorph new.
  11. myGrid addMorph: aRectc.
  12. aRectd := RectangleMorph new.
  13. myGrid addMorph: aRectd.
  14. aRecte := RectangleMorph new.
  15. myGrid addMorph: aRecte.
  16. aRectf := RectangleMorph new.
  17. myGrid addMorph: aRectf.
  18. aRectg := RectangleMorph new.
  19. myGrid addMorph: aRectg.
  20. aRec := myGrid center.
  21.  
  22. [Transcript show: (Time millisecondsToRun:[
  23.     1 to:1000 do: [:i|
  24.         1 to: 1000 do: [:j|
  25.             aRecta center: aRec +(rnd value@rnd value).
  26.             aRectb center: aRec +(rnd value@rnd value).
  27.             aRectc center: aRec +(rnd value@rnd value).
  28.             aRectd center: aRec +(rnd value@rnd value).
  29.             aRecte center: aRec +(rnd value@rnd value).
  30.             aRectf center: aRec +(rnd value@rnd value).
  31.             aRectg center: aRec +(rnd value@rnd value).
  32.             ]]]);cr] fork.
  33.  
  34. Smalltalk garbageCollect.
Advertisement
Add Comment
Please, Sign In to add comment