Skip to content

Commit 801bc89

Browse files
author
Fela Winkelmolen
committed
another turtle example :)
1 parent 87c314e commit 801bc89

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

samples/turtle_stars.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require 'h-ety-h/boot'
2+
3+
Turtle.start do
4+
background blue
5+
pencolor yellow
6+
30.times do
7+
go rand(400), rand(400)
8+
setheading rand(360)
9+
len = 5 + rand(30)
10+
5.times do
11+
forward len
12+
turnleft 180-360/10
13+
end
14+
end
15+
end

0 commit comments

Comments
 (0)