File: squaress.turtle

package info (click to toggle)
kturtle 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,392 kB
  • sloc: cpp: 7,717; ruby: 2,217; xml: 243; makefile: 3; sh: 3
file content (23 lines) | stat: -rw-r--r-- 270 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
kturtle-script-v1.0
# draw many squares

@(learn) square $x {
  @(repeat) 4 {
    @(forward) $x
    @(turnleft) 90
  }
}

@(reset)
@(penup)
@(go) 150@(,) 200
@(pendown)
@(penwidth) 5

@(repeat) 12 {
  @(penup)
  @(forward) 30
  @(pendown)
  square 80
  @(turnright) 30
}