You are on page 1of 2

to setup

clear-all

ask patches [
set pcolor GRAY
]

ask (patch-set
patch 1 16 patch 2 16 patch 3 16 patch 4 16 patch 5 16 patch 6 16
patch 1 15 patch 2 15 patch 3 15 patch 4 15 patch 5 15 patch 6 15
patch 1 14 patch 2 14 patch 3 14 patch 4 14 patch 5 14 patch 6 14
patch 1 14 patch 2 14 patch 3 14 patch 4 14 patch 5 14 patch 6 14
patch 1 13 patch 2 13 patch 3 13 patch 4 13 patch 5 13 patch 6 13
patch 1 12 patch 2 12 patch 3 12 patch 4 12 patch 5 12 patch 6 12
) [ set pcolor WHITE ]

ask (patch-set
patch -15 16 patch -14 16 patch -13 16 patch -12 16 patch -11 16
patch -10 16 patch -9 16 patch -8 16 patch -7 16 patch -6 16
patch -5 16 patch -4 16 patch -3 16 patch -2 16 patch -1 16 patch 0 16
patch -15 15 patch -14 15 patch -13 15 patch -12 15 patch -11 15
patch -10 15 patch -9 15 patch -8 15 patch -7 15 patch -6 15
patch -5 15 patch -4 15 patch -3 15 patch -2 15 patch -1 15 patch 0 15
patch -15 14 patch -14 14 patch -13 14 patch -12 14 patch -11 14
patch -10 14 patch -9 14 patch -8 14 patch -7 14 patch -6 14
patch -5 14 patch -4 14 patch -3 14 patch -2 14 patch -1 14 patch 0 14
patch -15 13 patch -14 13 patch -13 13 patch -12 13 patch -11 13
patch -10 13 patch -9 13 patch -8 13 patch -7 13 patch -6 13
patch -5 13 patch -4 13 patch -3 13 patch -2 13 patch -1 13 patch 0 13
patch -15 12 patch -14 12 patch -13 12 patch -12 12 patch -11 12
patch -10 12 patch -9 12 patch -8 12 patch -7 12 patch -6 12
patch -5 12 patch -4 12 patch -3 12 patch -2 12 patch -1 12 patch 0 12

) [ set pcolor BLACK ]

ask (patch-set
patch 7 16 patch 8 16 patch 9 16 patch 10 16 patch 11 16 patch 12 16 patch 13
16
patch 7 15 patch 8 15 patch 9 15 patch 10 15 patch 11 15 patch 12 15 patch 13
15
patch 7 14 patch 8 14 patch 9 14 patch 10 14 patch 11 14 patch 12 14 patch 13
14
patch 7 13 patch 8 13 patch 9 13 patch 10 13 patch 11 13 patch 12 13 patch 13
13
patch 7 12 patch 8 12 patch 9 12 patch 10 12 patch 11 12 patch 12 12 patch 13
12
) [ set pcolor BLACK ]

create-turtles 10 [
set xcor 3.5
set shape "person"
set heading 0
set size 7
]

ask turtle 0[
set color SKY
set ycor 0
]
ask turtle 1[
set color BLACK
set ycor -2
]

ask turtle 2[
set color BROWN
set ycor -4
]

ask turtle 3[
set color RED
set ycor -6
]

ask turtle 4[
set color ORANGE
set ycor -8
]

ask turtle 5[
set color YELLOW
set ycor -10
]

ask turtle 6[
set color GREEN
set ycor -12
]

ask turtle 7[
set color PINK
set ycor -14
]

ask turtle 8[
set color VIOLET
set ycor -16
]

ask turtle 9[
set color BLUE
set ycor -18
]
end

to go
ask turtles with[shape = "person"] [
forward 1
]
end