Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myGrid := PasteUpMorph new openInWorld.
- myGrid height: 1100;width:1100.
- rnd := [(-500 to: 500) atRandom].
- aRecta := RectangleMorph new.
- myGrid addMorph: aRecta.
- aRectb := RectangleMorph new.
- myGrid addMorph: aRectb.
- aRectc := RectangleMorph new.
- myGrid addMorph: aRectc.
- aRectd := RectangleMorph new.
- myGrid addMorph: aRectd.
- aRecte := RectangleMorph new.
- myGrid addMorph: aRecte.
- aRectf := RectangleMorph new.
- myGrid addMorph: aRectf.
- aRectg := RectangleMorph new.
- myGrid addMorph: aRectg.
- aRec := myGrid center.
- [Transcript show: (Time millisecondsToRun:[
- 1 to:1000 do: [:i|
- 1 to: 1000 do: [:j|
- aRecta center: aRec +(rnd value@rnd value).
- aRectb center: aRec +(rnd value@rnd value).
- aRectc center: aRec +(rnd value@rnd value).
- aRectd center: aRec +(rnd value@rnd value).
- aRecte center: aRec +(rnd value@rnd value).
- aRectf center: aRec +(rnd value@rnd value).
- aRectg center: aRec +(rnd value@rnd value).
- ]]]);cr] fork.
- Smalltalk garbageCollect.
Advertisement
Add Comment
Please, Sign In to add comment