Serendip is an independent site partnering with faculty at multiple colleges and universities around the world. Happy exploring!

Reply to comment

Paul Grobstein's picture

barrier code


to setup
crt 1
ask patches [if pycor > 0 and pycor < 20 and pxcor = 0 [ set pcolor red ]]
end

to go
ask turtles [set heading random 360
if [pcolor] of patch-ahead 1 = red [ set heading heading + 180]
fd 1]
end

Reply

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.
1 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.