to randomColor
make "myRed random 256
make "myGreen random 256
make "myBlue random 256
setpc (list :myRed :myGreen :myBlue)
setfc (list :myRed :myGreen :myBlue)
end
Here are methods for making a square frame in the center of the screen and then filling with random colors:
to centerSquare
penup
; go to lower right corner of square
bk 300 rt 90 fd 300 lt 90
pendown
repeat 4 [fd 600 lt 90]
; back to center
penup
fd 300 lt 90 fd 300 rt 90
end
to centerSquareColors
hideturtle
clearscreen
repeat 100 [
randomColor
centerSquare
fill
wait 75
]
showturtle
end
No comments:
Post a Comment